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

Disassembly:
sub esp, 0x2c
mov ecx, dword [esp + 0x30]
push ebx
push ebp
push esi
mov eax, dword [ecx + 0x3c]
push edi
add eax, ecx
xor ecx, ecx
xor edi, edi
xor edx, edx
mov cx, word [eax + 0x14]
mov di, word [eax + 6]
cmp edx, edi
mov dword [esp + 0x24], edx
lea ebp, [ecx + eax + 0x18]
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebp
jge 0x402884
mov esi, str..rsrc
mov eax, ebp
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40286d
test cl, cl
je 0x402869
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40286d
add eax, 2
add esi, 2
test cl, cl
jne 0x402849
xor eax, eax
jmp 0x402872
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40287e
inc edx
add ebp, 0x28
cmp edx, edi
jl 0x402842
mov dword [esp + 0x18], ebp
cmp edx, edi
je 0x4028da
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x28], edx
add eax, esi
xor edx, edx
xor esi, esi
mov dword [esp + 0x34], eax
mov dx, word [eax + 0xe]
mov si, word [eax + 0xc]
lea ecx, [eax + 0x10]
lea eax, [edx + esi]
test eax, eax
jle 0x4028da
mov esi, dword [ecx]
cmp esi, 3
jne 0x4028bb
mov dword [esp + 0x20], ecx
cmp esi, 0xe
jne 0x4028c4
mov dword [esp + 0x24], ecx
add ecx, 8
dec eax
jne 0x4028b0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x402916
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x402916
mov ebx, dword [esp + 0x4c]
push ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x4c]
mov ecx, ebx
mov edi, eax
mov dword [edx], eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx]
push ecx
call fcn.004026a0
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov ecx, dword [esp + 0x48]
xor edx, edx
mov dword [esp + 0x10], 0
mov eax, dword [ecx + 0x3c]
add eax, ecx
xor ecx, ecx
mov dx, word [eax + 0x14]
mov cx, word [eax + 6]
mov edi, dword [eax + 0x38]
mov esi, dword [eax + 0x3c]
lea ebx, [edx + eax + 0x18]
mov dword [esp + 0x14], ecx
test ecx, ecx
mov dword [esp + 0x40], ebx
jle 0x402996
mov ebp, str..rsrc
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [ebp]
jne 0x402975
test cl, cl
je 0x402971
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [ebp + 1]
jne 0x402975
add eax, 2
add ebp, 2
test cl, cl
jne 0x402950
xor eax, eax
jmp 0x40297a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4029a6
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc eax
add ebx, 0x28
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x402949
mov dword [esp + 0x40], ebx
cmp dword [esp + 0x10], ecx
jne 0x4029b0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x40], ebx
jmp 0x402996
mov ebx, dword [ebx + 8]
mov eax, dword [esp + 0x28]
lea ecx, [ebx + eax]
mov eax, ecx
mov dword [esp + 0x2c], ecx
cdq
idiv esi
mov eax, ecx
mov ecx, dword [esp + 0x40]
mov ebp, edx
neg ebp
cdq
sbb ebp, ebp
idiv esi
mov edx, dword [esp + 0x4c]
and ebp, esi
imul eax, esi
mov esi, dword [ecx + 0x10]
add ebp, eax
mov eax, ebp
sub eax, esi
mov dword [esp + 0x30], eax
lea esi, [eax + edx]
mov eax, ebx
cdq
idiv edi
push esi
mov dword [esp + 0x3c], esi
mov ecx, eax
mov eax, ebp
cdq
idiv edi
mov dword [esp + 0x44], ecx
mov ecx, eax
mov eax, dword [esp + 0x44]
sub ecx, eax
mov eax, ebx
cdq
imul ecx, edi
idiv edi
mov eax, ebp
neg edx
sbb edx, edx
and edx, edi
sub ecx, edx
cdq
idiv edi
neg edx
sbb edx, edx
and edx, edi
add ecx, edx
mov dword [esp + 0x20], ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x54]
mov ecx, esi
mov edi, eax
xor eax, eax
shr ecx, 2
mov dword [edx], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, esi
mov esi, dword [esp + 0x48]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x4c]
mov edi, dword [edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [edx]
mov eax, dword [edi + 0x3c]
add eax, edi
xor ecx, ecx
mov dword [esp + 0x48], eax
mov cx, word [eax + 0x14]
lea esi, [ecx + eax + 0x18]
mov dword [esp + 0x50], esi
xor edx, edx
mov dword [esp + 0x40], esi
mov dx, word [eax + 6]
mov dword [esp + 0x10], 0
test edx, edx
mov dword [esp + 0x14], edx
jle 0x402ae4
mov eax, str..rsrc
mov bl, byte [esi]
mov cl, bl
cmp bl, byte [eax]
jne 0x402abd
test cl, cl
je 0x402ab9
mov bl, byte [esi + 1]
mov cl, bl
cmp bl, byte [eax + 1]
jne 0x402abd
add esi, 2
add eax, 2
test cl, cl
jne 0x402a99
xor eax, eax
jmp 0x402ac2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402ae0
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x40]
inc eax
add esi, 0x28
cmp eax, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], esi
jl 0x402a94
jmp 0x402ae4
mov esi, dword [esp + 0x40]
cmp dword [esp + 0x10], edx
jne 0x402af4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov edx, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov esi, dword [esi + 0x10]
add edx, edi
add esi, edx
mov ecx, edi
mov edi, dword [esp + 0x4c]
sub ecx, esi
add ecx, edi
lea edi, [edx + ebp]
mov eax, ecx
mov dword [esp + 0x10], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
lea edi, [edx + ebx]
sub ecx, ebx
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov esi, dword [ecx + 0x50]
add esi, eax
mov eax, dword [ecx + 0x74]
test eax, eax
mov dword [ecx + 0x50], esi
jbe 0x402b8d
lea eax, [ecx + 0x78]
mov edi, dword [esp + 0x40]
mov esi, dword [eax]
mov edi, dword [edi + 0xc]
cmp esi, edi
jb 0x402b7a
jne 0x402b67
mov dword [eax + 4], ebp
mov edi, dword [esp + 0x40]
mov esi, dword [eax]
cmp esi, dword [edi + 0xc]
jbe 0x402b7a
mov edi, dword [esp + 0x1c]
add esi, edi
mov dword [eax], esi
mov esi, dword [esp + 0x10]
mov edi, dword [ecx + 0x74]
inc esi
add eax, 8
cmp esi, edi
mov dword [esp + 0x10], esi
jb 0x402b55
mov ecx, dword [esp + 0x14]
test ecx, ecx
jle 0x402bde
mov eax, dword [esp + 0x50]
mov edi, ecx
add eax, 0xc
mov esi, dword [esp + 0x40]
mov ecx, dword [eax]
mov esi, dword [esi + 0xc]
cmp ecx, esi
jb 0x402bd8
jne 0x402bb7
mov ecx, dword [esp + 0x2c]
mov dword [eax + 4], ebp
mov dword [eax - 4], ecx
mov esi, dword [esp + 0x40]
mov ecx, dword [eax]
cmp ecx, dword [esi + 0xc]
jbe 0x402bd8
mov ecx, dword [esp + 0x1c]
mov esi, dword [eax]
add esi, ecx
mov ecx, dword [esp + 0x30]
mov dword [eax], esi
mov esi, dword [eax + 8]
add esi, ecx
mov dword [eax + 8], esi
add eax, 0x28
dec edi
jne 0x402b9e
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x34]
mov eax, ecx
lea edi, [edx + ebx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea ebp, [edx + 0x10]
rep movsb byte es:[edi], byte [esi]
mov ax, word [edx + 0xc]
xor ecx, ecx
mov cx, word [edx + 0xe]
mov dword [esp + 0x48], ebp
add ecx, eax
mov dword [esp + 0x10], 0
test ecx, ecx
jle 0x402da6
cmp dword [ebp], 3
jne 0x402cce
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 4]
mov dword [esp + 0x4c], 0
mov eax, dword [eax + 4]
add eax, ebx
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
xor ecx, ecx
mov dword [ebp + 4], eax
and eax, 0x7fffffff
add eax, edx
mov edi, eax
xor eax, eax
mov cx, word [edi + 0xe]
mov ax, word [edi + 0xc]
add ecx, eax
test ecx, ecx
jle 0x402cce
lea esi, [edi + 0x14]
mov ecx, dword [esi]
test ecx, 0x80000000
jbe 0x402cac
lea eax, [ecx + ebx]
mov ebp, dword [esp + 0x18]
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
mov dword [esi], eax
and eax, 0x7fffffff
mov ecx, dword [eax + edx + 0x14]
lea eax, [eax + edx + 0x10]
add ecx, ebx
mov dword [eax + 4], ecx
mov eax, ecx
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + 0xc]
sub ecx, dword [ebp + 0xc]
mov ebp, dword [eax + edx]
add ecx, ebx
add ebp, ecx
mov dword [eax + edx], ebp
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov ax, word [edi + 0xe]
inc ecx
mov dword [esp + 0x4c], ecx
xor ecx, ecx
mov cx, word [edi + 0xc]
add esi, 8
add eax, ecx
mov ecx, dword [esp + 0x4c]
cmp ecx, eax
jl 0x402c64
cmp dword [ebp], 0xe
jne 0x402d80
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 4]
mov dword [esp + 0x4c], 0
mov eax, dword [eax + 4]
add eax, ebx
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
xor ecx, ecx
mov dword [ebp + 4], eax
and eax, 0x7fffffff
add eax, edx
mov edi, eax
xor eax, eax
mov cx, word [edi + 0xe]
mov ax, word [edi + 0xc]
add ecx, eax
test ecx, ecx
jle 0x402d80
lea esi, [edi + 0x14]
mov ecx, dword [esi]
test ecx, 0x80000000
jbe 0x402d5e
lea eax, [ecx + ebx]
mov ebp, dword [esp + 0x18]
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
mov dword [esi], eax
and eax, 0x7fffffff
mov ecx, dword [eax + edx + 0x14]
lea eax, [eax + edx + 0x10]
add ecx, ebx
mov dword [eax + 4], ecx
mov eax, ecx
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + 0xc]
sub ecx, dword [ebp + 0xc]
mov ebp, dword [eax + edx]
add ecx, ebx
add ebp, ecx
mov dword [eax + edx], ebp
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov ax, word [edi + 0xe]
inc ecx
mov dword [esp + 0x4c], ecx
xor ecx, ecx
mov cx, word [edi + 0xc]
add esi, 8
add eax, ecx
mov ecx, dword [esp + 0x4c]
cmp ecx, eax
jl 0x402d16
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [edx + 0xe]
xor esi, esi
mov si, word [edx + 0xc]
inc eax
add ecx, esi
add ebp, 8
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x48], ebp
jl 0x402c1c
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret