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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x59c
mov eax, dword [0x45900c]
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.00421d3c
xor edi, edi
lea eax, [esp + 0x3a4]
add esp, 0xc
cmp word [esp + 0x398], di
je 0x40dc08
cmp word [eax], 0x5c
jne 0x40dc00
push 0x2f
pop ecx
mov word [eax], cx
add eax, 2
cmp word [eax], di
jne 0x40dbf4
push 8
pop ebx
lea ecx, [esp + 0x398]
call fcn.0040d1c8
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.0041a220
push 0x44d896
lea eax, [esp + 0x60]
mov dword [esp + 0x384], edi
push 0x104
push eax
call fcn.004223b5
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 0x40dc7b
push 0x44d896
lea eax, [esp + 0x268]
sub ecx, edx
push 0x104
push eax
mov dword [esp + 0x3c], ecx
call fcn.004223b5
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 0x40dd06
mov eax, dword [esi + 0x58]
mov dword [esp + 0x28], eax
test eax, eax
jns 0x40dd0a
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.0040c80f
pop ecx
test eax, eax
je 0x40de6b
mov ecx, ebx
call fcn.0040d857
mov eax, 0x400
jmp 0x40dff0
mov eax, dword [esp + 0x30]
add eax, 0x1e
add eax, dword [esp + 0x34]
add dword [ebx + 0x14], eax
cmp dword [ebx + 0x10], 0
je 0x40de8e
mov ecx, ebx
call fcn.0040d857
mov eax, dword [ebx + 0x10]
jmp 0x40dff0
mov esi, dword [esp + 0x14]
xor edi, edi
cmp esi, 8
jne 0x40dea7
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.0040d897
jmp 0x40deb2
test esi, esi
jne 0x40deb4
mov ecx, ebx
call fcn.0040d97c
mov edi, eax
mov ecx, ebx
call fcn.0040d857
mov ecx, dword [ebx + 0x78]
add dword [ebx + 0x14], ecx
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40dff0
test edi, edi
jne 0x40de61
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 0x40df4f
mov ax, word [esp + 0x1c]
mov word [esp + 0x1e], si
test al, 1
jne 0x40df0a
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.0040d71c
test al, al
jne 0x40df2c
mov eax, 0x2000000
jmp 0x40dff0
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040c80f
pop ecx
test eax, eax
jne 0x40de61
push dword [ebx + 0x14]
mov ecx, ebx
call fcn.0040d71c
test al, al
jne 0x40df89
jmp 0x40df22
cmp word [esp + 0x1e], si
je 0x40df60
mov eax, 0x4000000
jmp 0x40dff0
test esi, esi
jne 0x40df68
test dl, dl
je 0x40df56
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040ca78
pop ecx
test eax, eax
jne 0x40de61
mov ax, word [esp + 0x44]
add dword [ebx + 0x14], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40dff0
push dword [esp + 0x38]
call fcn.00418557
push dword [esp + 0x3c]
mov esi, eax
push dword [esp + 0x160]
push esi
call fcn.004364e0
push 0x360
mov dword [esp + 0x16c], esi
call fcn.00417f70
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 0x40dfdd
mov dword [ebx + 0x2c], edx
jmp 0x40dfee
mov ecx, dword [eax]
lea eax, [ecx + 0x35c]
cmp dword [eax], 0
jne 0x40dfdb
mov dword [ecx + 0x35c], edx
xor eax, eax
mov ecx, dword [esp + 0x5a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00417f51
mov esp, ebp
pop ebp
ret 8