Function at 0x403540
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x7f8]
sub esp, 0x7f8
push 0xffffffffffffffff
push 0x497368
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4c1280]
xor eax, ebp
mov dword [ebp + 0x7f4], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x800]
mov edi, dword [ebp + 0x804]
xor ebx, ebx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x34], edi
cmp esi, ebx
je 0x4038d5
cmp edi, ebx
je 0x4038d5
lea ecx, [ebp - 0x40]
call fcn.0040b370
push 0x10
push 0x4b1508
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
call fcn.004754fb
add esp, 0xc
mov dword [ebp - 0x28], eax
cmp eax, ebx
jne 0x403601
call fcn.00408340
mov esi, eax
call fcn.004083f0
test eax, eax
jne 0x4035ef
push str.load_ObCtrl_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x403809
push str.Driver_mode_n
mov dword [ebp - 0x30], 1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x103
lea eax, [ebp + 0x6f1]
push ebx
push eax
mov byte [ebp + 0x6f0], 0
call fcn.00472990
lea eax, [ebp + 0x6f0]
call fcn.00402800
lea ecx, [ebp + 0x6f0]
push ecx
lea edx, [ebp]
push edx
call fcn.00469520
lea eax, [ebp + 0x208]
push eax
call fcn.00470390
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov eax, 0x1948b0fd
imul ecx
sar edx, 6
mov esi, edx
shr esi, 0x1f
add esi, edx
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 0x288
mul edx
seto cl
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 1
neg ecx
or ecx, eax
push ecx
call fcn.0047159e
inc esi
imul esi, esi, 0x288
add esp, 0x1c
push esi
mov ebx, eax
push 0
push ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], 0
call fcn.00472990
mov eax, dword [edi + 0xc]
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp eax, dword [edi + 0x10]
jbe 0x4036ad
call fcn.00475d4f
mov esi, dword [edi]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
jmp 0x4036c0
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x20], eax
cmp dword [edi + 0xc], eax
jbe 0x4036d0
call fcn.00475d4f
mov edi, dword [edi]
test esi, esi
je 0x4036da
cmp esi, edi
je 0x4036df
call fcn.00475d4f
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x18], ecx
je 0x40377c
test esi, esi
jne 0x403774
call fcn.00475d4f
mov edx, dword [ebp - 0x18]
cmp edx, dword [esi + 0x10]
jb 0x403705
call fcn.00475d4f
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
imul eax, eax, 0x288
add ebx, eax
push 0x288
mov ecx, 0xa2
mov edi, ebx
push ebx
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp]
push ebx
push ecx
call fcn.00469600
push 0x288
lea edx, [ebp + 0x208]
push ebx
push edx
call fcn.00470d50
mov eax, dword [ebp - 0x1c]
inc dword [ebp - 0x14]
add esp, 0x1c
test eax, eax
jne 0x403778
call fcn.00475d4f
xor eax, eax
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [eax + 0x10]
jb 0x40375f
call fcn.00475d4f
add dword [ebp - 0x18], 0x288
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x24]
jmp 0x4036c0
mov esi, dword [esi]
jmp 0x4036f8
mov eax, dword [eax]
jmp 0x403752
mov esi, dword [ebp - 0x14]
imul esi, esi, 0x288
lea edi, [esi + ebx]
lea edx, [edi + 0x24a]
push edx
lea eax, [ebp + 0x208]
push eax
mov dword [edi], 0x4348454b
call fcn.00470e00
push 0x288
push edi
lea ecx, [ebp]
push edi
push ecx
call fcn.00469600
add esp, 0x18
cmp dword [ebp - 0x30], 0
je 0x40384a
call fcn.00408340
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax]
mov edx, dword [edx]
add esi, 0x288
push esi
push ebx
push ecx
mov ecx, eax
call edx
test eax, eax
jne 0x403871
mov dword [ebp - 0x14], 0xfffffffd
push str.save_digest_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x403807
push esi
call fcn.00477ab6
push esi
call fcn.00474bde
add esp, 8
xor ebx, ebx
mov edx, dword [ebp - 0x24]
push edx
call fcn.0047311d
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x40], ebx
je 0x403842
push str.Wow64RevertWow64FsRedirection
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x403842
mov ecx, dword [ebp - 0x3c]
push ecx
call eax
mov eax, dword [ebp - 0x14]
jmp 0x4038d8
mov eax, dword [ebp - 0x28]
push eax
push 1
add esi, 0x288
push esi
push ebx
call fcn.0047515f
add esp, 0x10
cmp eax, 1
je 0x403871
mov dword [ebp - 0x14], 0xfffffffc
jmp 0x4037e6
xor ecx, ecx
push 0x3fe
push ecx
lea edx, [ebp + 0x2f2]
push edx
mov word [ebp + 0x2f0], cx
call fcn.00472990
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
push eax
push ecx
push edx
push str.save_cert__s_count:_d__d_n
lea eax, [ebp + 0x2f0]
push 0x200
push eax
call fcn.00474cf2
add esp, 0x24
lea ecx, [ebp + 0x2f0]
push ecx
jmp 0x4037eb
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x7f4]
xor ecx, ebp
call fcn.00472a79
add ebp, 0x7f8
mov esp, ebp
pop ebp
ret 8