Function at 0x40d148
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x59c
mov eax, dword [0x45800c]
xor eax, esp
mov dword [esp + 0x598], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push eax
lea eax, [esp + 0x39c]
mov esi, ecx
push 0x104
push eax
mov dword [esp + 0x1c], esi
call fcn.00420d8c
xor edi, edi
lea eax, [esp + 0x3a4]
add esp, 0xc
cmp word [esp + 0x398], di
je 0x40d1ab
cmp word [eax], 0x5c
jne 0x40d1a3
push 0x2f
pop ecx
mov word [eax], cx
add eax, 2
cmp word [eax], di
jne 0x40d197
push 8
pop ebx
lea ecx, [esp + 0x398]
call fcn.0040c76b
xor ecx, ecx
test al, al
push 0x360
lea eax, [esp + 0x1c]
cmovne ebx, ecx
push edi
push eax
mov dword [esp + 0x20], ebx
call fcn.00419290
push 0x44c896
lea eax, [esp + 0x60]
mov dword [esp + 0x384], edi
push 0x104
push eax
call fcn.00421405
add esp, 0x18
lea eax, [esp + 0x160]
push edi
push edi
push 0x103
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x3ac]
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x160]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d21e
push 0x44c896
lea eax, [esp + 0x268]
sub ecx, edx
push 0x104
push eax
mov dword [esp + 0x3c], ecx
call fcn.00421405
add esp, 0xc
mov dword [esp + 0x368], 1
xor eax, eax
mov word [esp + 0x1e], bx
mov word [esp + 0x42], ax
xor ecx, ecx
mov dword [esp + 0x15c], ecx
mov eax, 0xb17
mov word [esp + 0x18], ax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x370], ecx
mov dword [esp + 0x24], ecx
push 0x14
pop eax
mov word [esp + 0x1a], ax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x20], eax
push 8
pop eax
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
test ebx, ebx
jne 0x40d2a9
mov eax, dword [esi + 0x58]
mov dword [esp + 0x28], eax
test eax, eax
jns 0x40d2ad
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 0x58]
lea edi, [esp + 0x38c]
mov dword [esp + 0x2c], eax
xor eax, eax
mov word [esp + 0x40], ax
mov eax, dword [esi + 0x30]
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xc]
add eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x40]
mov ecx, ebx
mov edx, dword [esi + 0x44]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x378]
mov dword [esp + 0x154], eax
lea eax, [esp + 0x38c]
mov dword [esp + 0x158], eax
mov al, byte [esi + 0x40]
mov byte [esp + 0x37d], al
mov eax, edx
shrd ecx, eax, 8
mov dword [esp + 0x378], 0xd5455
sar eax, 8
mov byte [esp + 0x37e], cl
mov eax, edx
mov ecx, ebx
mov byte [esp + 0x37c], 7
shrd ecx, eax, 0x10
shrd ebx, edx, 0x18
sar eax, 0x10
mov al, byte [esi + 0x38]
mov byte [esp + 0x381], al
mov byte [esp + 0x37f], cl
mov byte [esp + 0x380], bl
mov ebx, dword [esi + 0x38]
mov ecx, ebx
sar edx, 0x18
mov edx, dword [esi + 0x3c]
mov eax, edx
shrd ecx, eax, 8
mov dword [esp + 0x34], 0x11
sar eax, 8
mov byte [esp + 0x382], cl
mov eax, edx
mov ecx, ebx
mov dword [esp + 0x38], 9
shrd ecx, eax, 0x10
shrd ebx, edx, 0x18
sar eax, 0x10
mov al, byte [esi + 0x48]
mov byte [esp + 0x385], al
mov byte [esp + 0x383], cl
mov byte [esp + 0x384], bl
mov ebx, dword [esi + 0x48]
mov ecx, ebx
sar edx, 0x18
mov edx, dword [esi + 0x4c]
mov eax, edx
shrd ecx, eax, 8
lea esi, [esp + 0x378]
mov byte [esp + 0x386], cl
mov ecx, ebx
sar eax, 8
mov eax, edx
shrd ecx, eax, 0x10
shrd ebx, edx, 0x18
mov byte [esp + 0x387], cl
lea ecx, [esp + 0x18]
mov byte [esp + 0x388], bl
mov ebx, dword [esp + 0x10]
movsd dword es:[edi], dword [esi]
sar eax, 0x10
sar edx, 0x18
push ebx
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov byte [esp + 0x392], 5
call fcn.0040bdb2
pop ecx
test eax, eax
je 0x40d40e
mov ecx, ebx
call fcn.0040cdfa
mov eax, 0x400
jmp 0x40d593
mov eax, dword [esp + 0x30]
add eax, 0x1e
add eax, dword [esp + 0x34]
add dword [ebx + 0x14], eax
cmp dword [ebx + 0x10], 0
je 0x40d431
mov ecx, ebx
call fcn.0040cdfa
mov eax, dword [ebx + 0x10]
jmp 0x40d593
mov esi, dword [esp + 0x14]
xor edi, edi
cmp esi, 8
jne 0x40d44a
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.0040ce3a
jmp 0x40d455
test esi, esi
jne 0x40d457
mov ecx, ebx
call fcn.0040cf1f
mov edi, eax
mov ecx, ebx
call fcn.0040cdfa
mov ecx, dword [ebx + 0x78]
add dword [ebx + 0x14], ecx
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40d593
test edi, edi
jne 0x40d404
cmp dword [esp + 0x28], ecx
mov eax, dword [ebx + 0x60]
sete dl
mov dword [esp + 0x24], eax
cmp byte [ebx + 0x18], 0
mov eax, dword [ebx + 0x58]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
je 0x40d4f2
mov ax, word [esp + 0x1c]
mov word [esp + 0x1e], si
test al, 1
jne 0x40d4ad
mov ecx, 0xfff7
and ax, cx
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov ecx, ebx
mov eax, dword [esp + 0x4c]
sub eax, dword [ebx + 0xc]
push eax
call fcn.0040ccbf
test al, al
jne 0x40d4cf
mov eax, 0x2000000
jmp 0x40d593
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040bdb2
pop ecx
test eax, eax
jne 0x40d404
push dword [ebx + 0x14]
mov ecx, ebx
call fcn.0040ccbf
test al, al
jne 0x40d52c
jmp 0x40d4c5
cmp word [esp + 0x1e], si
je 0x40d503
mov eax, 0x4000000
jmp 0x40d593
test esi, esi
jne 0x40d50b
test dl, dl
je 0x40d4f9
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040c01b
pop ecx
test eax, eax
jne 0x40d404
mov ax, word [esp + 0x44]
add dword [ebx + 0x14], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40d593
push dword [esp + 0x38]
call fcn.0041757e
push dword [esp + 0x3c]
mov esi, eax
push dword [esp + 0x160]
push esi
call fcn.00435500
push 0x360
mov dword [esp + 0x16c], esi
call fcn.00416f97
mov edx, eax
lea esi, [esp + 0x2c]
mov ecx, 0xd8
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x2c]
add esp, 0x14
test ecx, ecx
jne 0x40d580
mov dword [ebx + 0x2c], edx
jmp 0x40d591
mov ecx, dword [eax]
lea eax, [ecx + 0x35c]
cmp dword [eax], 0
jne 0x40d57e
mov dword [ecx + 0x35c], edx
xor eax, eax
mov ecx, dword [esp + 0x5a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416f78
mov esp, ebp
pop ebp
ret 8