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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
push edi
mov dword [ebp - 0x14], esi
mov ecx, dword [esi + 0x1af28]
mov al, byte [esi + 0x1af2c]
mov byte [ecx + esi + 0x19f20], al
mov ecx, 0xffff
mov eax, dword [esi + 0x1af48]
mov dword [ebp - 0x10], eax
cmp word [eax], cx
jne 0x401d10
movzx eax, word [esi + 0x1c]
lea ecx, [esi + 0x28]
movzx edx, word [esi + 0x20]
xor edi, edi
add edx, eax
movzx eax, word [esi + 0x18]
add edx, eax
movzx eax, word [esi + 0x14]
add edx, eax
movzx eax, word [esi + 0x10]
add edx, eax
movzx eax, word [esi + 0xc]
add edx, eax
movzx eax, word [esi + 8]
add edx, eax
xor ebx, ebx
mov dword [ebp - 8], edx
lea edx, [edi + 0x3c]
movzx eax, word [ecx - 4]
lea ecx, [ecx + 8]
add edi, eax
movzx eax, word [ecx - 8]
add ebx, eax
sub edx, 1
jne 0x401cb0
movzx ecx, word [esi + 0x204]
lea eax, [ebx + edi]
add ecx, eax
xor edi, edi
mov dword [ebp - 0xc], ecx
xor ebx, ebx
lea ecx, [esi + 0x20c]
lea esi, [edx + 0x40]
mov edx, dword [ebp - 8]
movzx eax, word [ecx - 4]
lea ecx, [ecx + 8]
add edi, eax
movzx eax, word [ecx - 8]
add ebx, eax
sub esi, 1
jne 0x401ce3
mov ecx, dword [ebp - 0x10]
lea eax, [ebx + edi]
mov esi, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0xc]
shr eax, 2
cmp eax, edx
sbb eax, eax
inc eax
mov word [ecx], ax
lea edx, [esi + 0xf84]
mov ecx, esi
call fcn.00401760
mov eax, dword [esi]
test dword [eax], 0x40000000
jne 0x4020fe
lea edx, [esi + 0xfa0]
mov ecx, esi
call fcn.00401760
mov eax, dword [esi]
test dword [eax], 0x40000000
jne 0x4020fe
push dword [esi + 0xf9c]
lea edx, [esi + 8]
mov ecx, esi
xor edi, edi
call fcn.004019a0
push dword [esi + 0xfb8]
lea edx, [esi + 0x8fc]
call fcn.004019a0
add esp, 8
lea edx, [esi + 0xfbc]
call fcn.00401760
mov edx, dword [esi]
mov eax, dword [edx]
test eax, 0x40000000
jne 0x4020fe
mov edi, 0x12
mov ecx, 0x421c84
movzx eax, byte [ecx + 2]
cmp word [esi + eax*4 + 0xeea], 0
jne 0x401de6
movzx eax, byte [ecx + 1]
cmp word [esi + eax*4 + 0xeea], 0
jne 0x401de5
movzx eax, byte [ecx]
cmp word [esi + eax*4 + 0xeea], 0
jne 0x401de0
movzx eax, byte [ecx - 1]
cmp word [esi + eax*4 + 0xeea], 0
jne 0x401ddb
sub ecx, 4
sub edi, 4
cmp ecx, 0x421c75
jge 0x401d90
jmp 0x401de6
sub edi, 3
jmp 0x401de6
sub edi, 2
jmp 0x401de6
dec edi
lea eax, [edi*2 + 0x11]
add eax, edi
add dword [esi + 0x1af30], eax
mov eax, dword [edx]
test eax, 0x40000000
jne 0x4020fe
mov eax, dword [esi + 0x1af30]
mov ecx, dword [esi + 0x1af34]
add eax, 0xa
mov ebx, dword [ebp + 8]
add ecx, 0xa
shr eax, 3
shr ecx, 3
cmp ecx, eax
mov edx, ecx
cmova edx, eax
lea eax, [ebx + 4]
cmp eax, edx
ja 0x401f55
cmp dword [ebp - 4], 0
je 0x401f55
mov edi, dword [ebp + 0xc]
mov ecx, esi
push 3
mov edx, edi
call fcn.004023e0
mov ecx, dword [esi + 0x1af40]
add esp, 4
mov eax, dword [esi + 0x1af44]
add ecx, 0xa
mov dword [esi + 0x1af40], 0
adc eax, 0
mov dword [esi + 0x1af44], 0
shrd ecx, eax, 3
shr eax, 3
add ecx, ebx
adc eax, 0
add ecx, 4
adc eax, 0
add dword [esi + 0x1af38], ecx
mov ecx, esi
adc dword [esi + 0x1af3c], eax
call fcn.004024a0
mov ecx, dword [esi + 0x1af5c]
lea eax, [ecx + 3]
cmp eax, dword [esi + 0x1af60]
jb 0x401ec3
mov edx, dword [esi + 0x1af58]
push ecx
mov ecx, dword [esi]
call fcn.00403700
add esp, 4
mov dword [esi + 0x1af5c], 0
xor ecx, ecx
mov eax, dword [esi + 0x1af58]
mov byte [ecx + eax], bl
inc dword [esi + 0x1af5c]
mov edx, dword [esi + 0x1af5c]
mov eax, dword [esi + 0x1af58]
movzx ebx, bx
mov ecx, ebx
not ebx
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x1af5c]
mov edx, dword [esi + 0x1af5c]
mov eax, dword [esi + 0x1af58]
mov cl, byte [ebp + 8]
not cl
shr ebx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x1af5c]
mov ecx, dword [esi + 0x1af5c]
mov eax, dword [esi + 0x1af58]
mov byte [ecx + eax], bl
inc dword [esi + 0x1af5c]
push dword [esi + 0x1af5c]
mov edx, dword [esi + 0x1af58]
mov ecx, dword [esi]
call fcn.00403700
push dword [ebp + 8]
mov edx, dword [ebp - 4]
mov ecx, dword [esi]
mov dword [esi + 0x1af5c], 0
call fcn.00403700
add esp, 8
jmp 0x4020b1
cmp ecx, edx
mov ecx, esi
push 3
jne 0x401f8a
mov edi, dword [ebp + 0xc]
lea edx, [edi + 2]
call fcn.004023e0
lea eax, [esi + 0xe70]
mov ecx, esi
push eax
lea edx, [esi + 0x9f0]
call fcn.00402270
mov eax, dword [esi + 0x1af34]
add esp, 8
jmp 0x40206d
mov edx, dword [ebp + 0xc]
add edx, 4
call fcn.004023e0
mov eax, dword [esi + 0xf9c]
lea ebx, [edi + 1]
mov edi, dword [esi + 0xfb8]
mov ecx, esi
push 5
mov dword [ebp - 0x10], edi
lea edx, [eax - 0x100]
mov dword [ebp - 0x14], eax
call fcn.004023e0
add esp, 8
test eax, eax
je 0x40204e
push 5
mov edx, edi
mov ecx, esi
call fcn.004023e0
add esp, 4
test eax, eax
je 0x40204e
push 4
lea edx, [ebx - 4]
mov ecx, esi
call fcn.004023e0
add esp, 4
test eax, eax
je 0x40204e
xor edi, edi
test ebx, ebx
jle 0x402021
mov eax, dword [esi]
test dword [eax], 0x40000000
jne 0x40204e
movzx eax, byte [edi + 0x421c74]
mov ecx, esi
push 3
movzx edx, word [esi + eax*4 + 0xeea]
call fcn.004023e0
add esp, 4
test eax, eax
je 0x40204e
inc edi
cmp edi, ebx
jl 0x401ff3
push dword [ebp - 0x14]
lea ebx, [esi + 8]
mov ecx, esi
mov edx, ebx
call fcn.00401a90
add esp, 4
lea edi, [esi + 0x8fc]
test eax, eax
je 0x402057
push dword [ebp - 0x10]
mov edx, edi
mov ecx, esi
call fcn.00401a90
add esp, 4
jmp 0x402057
lea ebx, [esi + 8]
lea edi, [esi + 0x8fc]
push edi
mov edx, ebx
mov ecx, esi
call fcn.00402270
mov eax, dword [esi + 0x1af30]
add esp, 4
mov edi, dword [ebp + 0xc]
add eax, 3
add dword [esi + 0x1af40], eax
mov edx, dword [esi + 0x1af40]
adc dword [esi + 0x1af44], 0
mov ecx, dword [esi + 0x1af44]
mov eax, edx
mov dword [esi + 0x1af44], 0
shrd eax, ecx, 3
shr ecx, 3
add dword [esi + 0x1af38], eax
adc dword [esi + 0x1af3c], ecx
and edx, 7
mov dword [esi + 0x1af40], edx
mov eax, dword [esi]
cmp dword [eax + 0x20], 0
jne 0x4020fe
mov ecx, esi
call fcn.00401000
test edi, edi
je 0x4020d7
call fcn.004024a0
add dword [esi + 0x1af40], 7
adc dword [esi + 0x1af44], 0
mov ecx, dword [esi + 0x1af44]
mov edx, dword [esi + 0x1af40]
mov eax, dword [esi]
shrd edx, ecx, 3
shr ecx, 3
add edx, dword [esi + 0x1af38]
adc ecx, dword [esi + 0x1af3c]
mov dword [eax + 0x78], edx
mov dword [eax + 0x7c], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret