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

Disassembly:
sub esp, 0x6c
mov eax, dword [0x422108]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x70]
push ebx
push ebp
xor ebx, ebx
or ebp, 0xffffffff
cmp ecx, ebx
lea edx, [esp + 0x20]
push edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ebx
mov edi, eax
mov dword [esp + 0x14], edx
je 0x4052b7
cmp eax, ebx
je 0x4052b7
push esi
push 0x74
call fcn.0040bee3
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4051a8
push ebx
push ebx
push ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x44], ebx
mov dword [esi], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 4], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x6c], ebp
call fcn.004088d0
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esi + 0x50], ebx
mov dword [esi + 0x58], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4050b8
sub eax, edx
add eax, 1
push eax
call fcn.0040bee3
add esp, 4
cmp eax, ebx
mov dword [esi + 0x54], eax
je 0x4051a3
mov ecx, dword [esp + 0x14]
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
cmp al, bl
jne 0x4050e0
mov byte [esi + 0x5c], bl
mov cl, 0x72
cmp byte [edi], cl
jne 0x4050fa
mov byte [esi + 0x5c], cl
mov al, byte [edi]
cmp al, 0x77
je 0x405104
cmp al, 0x61
jne 0x405108
mov byte [esi + 0x5c], 0x77
mov al, byte [edi]
cmp al, 0x30
jl 0x40511a
cmp al, 0x39
jg 0x40511a
movsx ebp, al
sub ebp, 0x30
jmp 0x405151
cmp al, 0x66
jne 0x405128
mov dword [esp + 0x10], 1
jmp 0x405151
cmp al, 0x68
jne 0x405136
mov dword [esp + 0x10], 2
jmp 0x405151
cmp al, 0x52
jne 0x405144
mov dword [esp + 0x10], 3
jmp 0x405151
mov edx, dword [esp + 0x18]
mov byte [edx], al
add edx, 1
mov dword [esp + 0x18], edx
add edi, 1
cmp al, bl
je 0x405162
lea eax, [esp + 0x78]
cmp dword [esp + 0x18], eax
jne 0x4050f3
mov al, byte [esi + 0x5c]
cmp al, bl
je 0x4051a3
cmp al, 0x77
jne 0x4051bd
mov ecx, dword [esp + 0x10]
push 0x38
push 0x41ae2c
push ecx
push 8
push 0xfffffffffffffff1
push 8
push ebp
push esi
call fcn.00408410
push 0x4000
mov edi, eax
call fcn.0040bee3
add esp, 0x24
cmp edi, ebx
mov dword [esi + 0x48], eax
mov dword [esi + 0xc], eax
jne 0x4051a3
cmp eax, ebx
jne 0x4051e7
call fcn.00404b40
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0040b00e
add esp, 0x6c
ret
push 0x4000
call fcn.0040bee3
push 0x38
push 0x41ae2c
push 0xfffffffffffffff1
push esi
mov dword [esi + 0x44], eax
mov dword [esi], eax
call fcn.004055a0
add esp, 0x14
test eax, eax
jne 0x4051a3
cmp dword [esi + 0x44], ebx
je 0x4051a3
mov dword [esi + 0x10], 0x4000
call fcn.0040bc83
mov dword [eax], ebx
mov eax, dword [esp + 0x84]
cmp eax, ebx
jge 0x405211
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.0040b9e6
jmp 0x40521c
lea ecx, [esp + 0x28]
push ecx
push eax
call fcn.0040c757
add esp, 8
cmp eax, ebx
mov dword [esi + 0x40], eax
je 0x4051a3
cmp byte [esi + 0x5c], 0x77
jne 0x405289
push 0xb
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 8
push 0x8b
push 0x1f
lea edx, [esp + 0x44]
push 0x41ae14
push edx
call fcn.0040b11c
lea eax, [esp + 0x4c]
push 0xa
push eax
call fcn.00404c20
mov edx, dword [esi + 0x40]
lea ecx, [esp + 0x54]
push ecx
push edx
call fcn.0040c608
add esp, 0x40
mov dword [esi + 0x60], 0xa
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0040b00e
add esp, 0x6c
ret
mov eax, esi
call fcn.00404d70
mov eax, dword [esi + 0x40]
push eax
call fcn.0040c59a
add esp, 4
sub eax, dword [esi + 4]
mov dword [esi + 0x60], eax
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0040b00e
add esp, 0x6c
ret
mov ecx, dword [esp + 0x74]
pop edi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040b00e
add esp, 0x6c
ret