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

Disassembly:
sub esp, 0x44
mov edx, dword [esp + 0x48]
and dword [esp], 0
push ebx
push ebp
mov eax, dword [edx + 0x4010]
mov ecx, dword [edx + 0x4008]
push esi
mov esi, dword [esp + 0x58]
mov ebx, esi
sub ebx, eax
mov dword [esp + 0x2c], ecx
add eax, ecx
mov dword [esp + 0x3c], ebx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x4c], eax
sub eax, esi
mov dword [esp + 0x38], eax
push edi
lea eax, [esi + ecx]
mov dword [esp + 0x14], esi
lea ebp, [eax - 0xc]
mov dword [esp + 0x44], eax
add eax, 0xfffffffb
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x60]
mov edi, eax
add eax, dword [esp + 0x68]
mov dword [esp + 0x34], eax
cmp ecx, 0x7e000000
jbe 0x402471
xor eax, eax
jmp 0x4028f9
mov eax, dword [esp + 0x74]
sub eax, 1
je 0x40248b
sub eax, 1
mov dword [esp + 0x64], esi
mov eax, esi
je 0x402491
mov dword [esp + 0x18], esi
jmp 0x40249b
mov eax, esi
mov dword [esp + 0x64], ebx
sub eax, dword [edx + 0x4000]
mov dword [esp + 0x18], eax
cmp dword [esp + 0x70], 2
jne 0x4024aa
cmp ecx, 0x1000b
jge 0x40246a
mov dword [esp + 0x4c], 0xff
cmp ecx, 0xd
jl 0x40286d
push eax
push dword [esp + 0x74]
push edx
push esi
call fcn.004029a2
push dword [esp + 0x80]
lea ebp, [esi + 1]
push ebp
call fcn.00402987
add esp, 0x18
push 0x40
xor ecx, ecx
mov edx, ebp
pop ebx
inc ecx
mov dword [esp + 0x1c], ebx
jmp 0x4024ec
mov ebx, dword [esp + 0x1c]
mov ebp, edx
mov dword [esp + 0x48], eax
add edx, ecx
mov ecx, ebx
shr ecx, 6
inc dword [esp + 0x1c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
cmp edx, dword [esp + 0x38]
ja 0x402867
push dword [esp + 0x18]
push dword [esp + 0x74]
push dword [esp + 0x60]
push eax
call fcn.0040295f
add esp, 0x10
mov ebx, eax
cmp dword [esp + 0x74], 2
jne 0x40254c
cmp ebx, esi
jae 0x402543
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x64], eax
jmp 0x40254c
and dword [esp + 0x10], 0
mov dword [esp + 0x64], esi
push dword [esp + 0x70]
push edx
call fcn.00402987
push dword [esp + 0x20]
mov dword [esp + 0x2c], eax
push dword [esp + 0x7c]
push dword [esp + 0x68]
push dword [esp + 0x5c]
push ebp
call fcn.004029ca
mov edx, dword [esp + 0x40]
add esp, 0x1c
cmp ebx, dword [esp + 0x40]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x78], 1
cmove eax, ecx
mov ecx, dword [esp + 0x28]
test eax, eax
mov eax, dword [esp + 0x20]
jne 0x4024e8
lea eax, [ebx + 0xffff]
cmp eax, ebp
sbb eax, eax
xor ecx, ecx
neg eax
cmp dword [esp + 0x70], 2
cmove eax, ecx
mov ecx, dword [esp + 0x28]
test eax, eax
mov eax, dword [esp + 0x20]
jne 0x4024e8
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax]
cmp eax, dword [ebp]
mov eax, dword [esp + 0x20]
jne 0x4024e8
mov edx, dword [esp + 0x14]
cmp ebp, edx
jbe 0x402605
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x64]
add ecx, ebx
cmp ecx, esi
jbe 0x402601
lea eax, [ebp - 1]
mov dword [esp + 0x48], eax
mov al, byte [eax]
cmp al, byte [ecx - 1]
jne 0x402601
mov ebp, dword [esp + 0x48]
dec ebx
dec ecx
cmp ebp, edx
ja 0x4025e5
mov esi, dword [esp + 0x5c]
mov ecx, ebp
sub ecx, edx
mov edx, edi
inc edi
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x6c], 0
mov dword [esp + 0x1c], edx
je 0x402638
xor edx, edx
mov eax, ecx
div dword [esp + 0x4c]
add eax, 8
add eax, ecx
add eax, edi
cmp eax, dword [esp + 0x34]
ja 0x40246a
mov edx, dword [esp + 0x1c]
cmp ecx, 0xf
jb 0x402687
mov eax, dword [esp + 0x1c]
lea edx, [ecx - 0xf]
mov dword [esp + 0x48], edx
mov byte [eax], 0xf0
mov eax, 0xff
cmp edx, eax
jl 0x402682
mov eax, edx
mov ecx, 0xff
xor edx, edx
div ecx
mov esi, eax
push esi
push ecx
push edi
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esp + 0x54]
add edi, esi
mov ecx, dword [esp + 0x34]
add esp, 0xc
imul eax, esi, 0xffffff01
mov esi, dword [esp + 0x5c]
add edx, eax
mov byte [edi], dl
inc edi
jmp 0x40268e
mov al, cl
shl al, 4
mov byte [edx], al
lea edx, [ecx + edi]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
lea ecx, [ecx + 8]
mov dword [edi], eax
mov eax, dword [ecx - 4]
mov dword [edi + 4], eax
add edi, 8
cmp edi, edx
jb 0x402695
mov edi, edx
mov eax, ebp
sub eax, ebx
mov word [edi], ax
add edi, 2
cmp dword [esp + 0x74], 2
jne 0x40270f
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x64], eax
jne 0x40270f
add ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x50]
sub esi, ebx
add esi, ebp
cmp esi, dword [esp + 0x2c]
lea eax, [ebx + 4]
cmova esi, dword [esp + 0x2c]
push esi
push eax
lea eax, [ebp + 4]
push eax
call fcn.00402901
add ebp, 4
mov ebx, eax
add ebp, ebx
add esp, 0xc
cmp ebp, esi
mov esi, dword [esp + 0x5c]
jne 0x40272a
push dword [esp + 0x2c]
push esi
push ebp
call fcn.00402901
add esp, 0xc
add ebx, eax
add ebp, eax
jmp 0x40272a
push dword [esp + 0x2c]
lea eax, [ebx + 4]
push eax
lea eax, [ebp + 4]
push eax
call fcn.00402901
mov ebx, eax
add ebp, 4
add esp, 0xc
add ebp, ebx
cmp ebx, 0xf
jb 0x402791
cmp dword [esp + 0x6c], 0
je 0x40274a
mov eax, ebx
shr eax, 8
add eax, 6
add eax, edi
cmp eax, dword [esp + 0x34]
ja 0x40246a
mov eax, dword [esp + 0x1c]
sub ebx, 0xf
mov ecx, 0x1fe
add byte [eax], 0xf
cmp ebx, ecx
jb 0x40277e
xor edx, edx
mov eax, ebx
div ecx
mov ecx, 0xff
mov edx, 0x1fe
mov word [edi], 0xffff
sub ebx, edx
add edi, 2
sub eax, 1
jne 0x40276d
jmp 0x402783
mov ecx, 0xff
cmp ebx, ecx
jb 0x40278c
sub ebx, ecx
mov byte [edi], cl
inc edi
mov byte [edi], bl
inc edi
jmp 0x402797
mov eax, dword [esp + 0x1c]
add byte [eax], bl
mov ecx, ebp
mov dword [esp + 0x14], ecx
cmp ebp, dword [esp + 0x38]
ja 0x40286f
push dword [esp + 0x18]
mov ebx, dword [esp + 0x5c]
lea eax, [ebp - 2]
push dword [esp + 0x74]
push ebx
push eax
call fcn.004029a2
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
push dword [esp + 0x74]
push ebx
push dword [esp + 0x7c]
push ebp
call fcn.00402987
add esp, 8
push eax
call fcn.0040295f
add esp, 0x10
mov ebx, eax
cmp dword [esp + 0x74], 2
jne 0x402808
cmp ebx, esi
jae 0x4027ff
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x64], eax
jmp 0x402808
and dword [esp + 0x10], 0
mov dword [esp + 0x64], esi
push edx
push dword [esp + 0x74]
push dword [esp + 0x60]
push ebp
call fcn.004029a2
add esp, 0x10
cmp ebx, dword [esp + 0x40]
sbb ecx, ecx
xor eax, eax
inc eax
inc ecx
cmp dword [esp + 0x78], eax
cmove eax, ecx
test eax, eax
je 0x402854
lea eax, [ebx + 0xffff]
cmp eax, ebp
jb 0x402854
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax]
cmp eax, dword [ebp]
jne 0x402854
mov edx, edi
mov dword [esp + 0x1c], edi
inc edi
mov byte [edx], 0
jmp 0x4026ab
push dword [esp + 0x70]
inc ebp
push ebp
call fcn.00402987
add esp, 8
jmp 0x4024da
mov ecx, dword [esp + 0x14]
jmp 0x40286f
mov ecx, esi
mov ebp, dword [esp + 0x44]
mov esi, 0xff
sub ebp, ecx
cmp dword [esp + 0x6c], 0
mov ebx, ebp
je 0x4028a0
xor edx, edx
lea eax, [ebx + 0xf0]
div esi
sub eax, dword [esp + 0x60]
inc eax
add eax, ebx
add eax, edi
cmp eax, dword [esp + 0x68]
ja 0x40246a
cmp ebx, 0xf
jl 0x4028d8
mov byte [edi], 0xf0
sub ebx, 0xf
inc edi
cmp ebx, esi
jl 0x4028db
xor edx, edx
mov eax, ebx
div esi
mov esi, eax
mov eax, 0xff
push esi
push eax
push edi
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [esp + 0x20]
add esp, 0xc
imul eax, esi, 0xffffff01
add edi, esi
add ebx, eax
jmp 0x4028db
shl bl, 4
push ebp
push ecx
lea esi, [edi + 1]
mov byte [edi], bl
push esi
call sub.VCRUNTIME140.dll_memcpy
sub esi, dword [esp + 0x20]
add esp, 0xc
sub esi, dword [esp + 0x60]
add esi, dword [esp + 0x44]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret