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

Disassembly:
sub esp, 0x30
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + 0x3c]
push ebx
add eax, ecx
push ebp
push esi
movzx esi, word [eax + 0x14]
lea ebx, [esi + eax + 0x18]
movzx eax, word [eax + 6]
xor edx, edx
cmp edx, eax
push edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebx
jge 0x401186
mov edi, edi
mov edi, str..rsrc
mov esi, ebx
mov ecx, 6
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x40117c
add edx, 1
add ebx, 0x28
cmp edx, eax
jl 0x401160
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x18], ebx
cmp edx, eax
jne 0x4011b9
mov esi, dword [esp + 0x4c]
push esi
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x54]
push esi
push ecx
push eax
mov dword [edi], eax
call sub.MSVCR80.dll_memcpy
mov edx, dword [edi]
push edx
call section..text
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov eax, dword [ebx + 8]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x14]
add eax, ecx
movzx ecx, word [eax + 0xe]
mov dword [esp + 0x38], eax
lea edx, [eax + 0x10]
movzx eax, word [eax + 0xc]
add ecx, eax
test ecx, ecx
jle 0x401188
lea ebx, [ebx]
mov eax, dword [edx]
cmp eax, 3
jne 0x4011eb
mov dword [esp + 0x20], edx
cmp eax, 0xe
jne 0x4011f4
mov dword [esp + 0x24], edx
add edx, 8
sub ecx, 1
jne 0x4011e0
cmp dword [esp + 0x20], 0
jne 0x40120e
cmp dword [esp + 0x24], 0
je 0x401188
mov ecx, dword [esp + 0x48]
mov eax, dword [ecx + 0x3c]
mov ebx, dword [eax + ecx + 0x38]
mov ebp, dword [eax + ecx + 0x3c]
add eax, ecx
movzx ecx, word [eax + 0x14]
lea edx, [ecx + eax + 0x18]
movzx eax, word [eax + 6]
test eax, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x44], 0
jle 0x40126c
nop
xor eax, eax
mov eax, dword [esp + 0x10]
mov edi, str..rsrc
mov esi, edx
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
je 0x401268
mov ecx, dword [esp + 0x44]
add ecx, 1
add edx, 0x28
cmp ecx, eax
mov dword [esp + 0x44], ecx
jl 0x401240
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x44], eax
jne 0x40127c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [edx + 8]
mov edx, dword [esp + 0x28]
lea eax, [ecx + edx]
mov dword [esp + 0x30], eax
cdq
idiv ebp
neg edx
sbb edx, edx
imul eax, ebp
and edx, ebp
add edx, eax
mov esi, edx
mov edx, dword [esp + 0x1c]
mov eax, esi
sub eax, dword [edx + 0x10]
mov edx, dword [esp + 0x4c]
lea edi, [eax + edx]
mov dword [esp + 0x34], eax
mov eax, ecx
cdq
idiv ebx
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x40], edi
mov ebp, eax
mov ecx, edx
mov eax, esi
cdq
idiv ebx
sub eax, ebp
imul eax, ebx
neg ecx
sbb ecx, ecx
and ecx, ebx
sub eax, ecx
neg edx
sbb edx, edx
and edx, ebx
add eax, edx
mov dword [esp + 0x20], eax
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov esi, dword [esp + 0x54]
push edi
push 0
push eax
mov dword [esi], eax
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esi]
push eax
push ecx
push edx
call sub.MSVCR80.dll_memcpy
mov eax, dword [esi]
mov ebx, dword [eax + 0x3c]
movzx ecx, word [ebx + eax + 0x14]
add ebx, eax
lea ebp, [ecx + ebx + 0x18]
movzx ecx, word [ebx + 6]
add esp, 0x1c
test ecx, ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x44], 0
jle 0x401356
nop
mov edi, str..rsrc
mov esi, ebp
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x401356
mov ecx, dword [esp + 0x44]
add ecx, 1
add ebp, 0x28
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x44], ecx
jl 0x401330
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x44], ecx
je 0x401272
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x14]
mov edi, dword [ebp + 8]
add esi, eax
add ecx, esi
sub eax, ecx
add eax, dword [esp + 0x4c]
push eax
push ecx
lea eax, [esi + edx]
push eax
call sub.MSVCR80.dll_memcpy
mov ecx, dword [esp + 0x20]
sub ecx, edi
push ecx
lea eax, [esi + edi]
push 0
push eax
call sub.MSVCR80.dll_memset
mov edx, dword [esp + 0x34]
add dword [ebx + 0x50], edx
add esp, 0x18
cmp dword [ebx + 0x74], 0
mov dword [esp + 0x44], 0
jbe 0x4013e5
lea ecx, [ebx + 0x78]
mov eax, dword [ecx]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jb 0x4013d2
jne 0x4013c5
mov edx, dword [esp + 0x14]
mov dword [ecx + 4], edx
cmp eax, dword [ebp + 0xc]
jbe 0x4013d2
mov edx, dword [esp + 0x1c]
add eax, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x44]
add eax, 1
add ecx, 8
cmp eax, dword [ebx + 0x74]
mov dword [esp + 0x44], eax
jb 0x4013b3
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x40142b
mov eax, dword [esp + 0x2c]
add eax, 0xc
mov ebx, ecx
mov ecx, dword [eax]
mov edx, dword [ebp + 0xc]
cmp ecx, edx
jb 0x401423
jne 0x40140f
mov edx, dword [esp + 0x30]
mov dword [eax - 4], edx
mov edx, dword [esp + 0x14]
mov dword [eax + 4], edx
cmp ecx, dword [ebp + 0xc]
jbe 0x401423
mov edx, dword [esp + 0x1c]
add ecx, edx
mov dword [eax], ecx
mov ecx, dword [esp + 0x34]
add dword [eax + 8], ecx
add eax, 0x28
sub ebx, 1
jne 0x4013f6
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
push edx
push eax
lea eax, [esi + edi]
push eax
call sub.MSVCR80.dll_memcpy
movzx ecx, word [esi + 0xe]
movzx eax, word [esi + 0xc]
add ecx, eax
add esp, 0xc
test ecx, ecx
lea edx, [esi + 0x10]
mov dword [esp + 0x44], 0
jle 0x4015df
mov edi, edi
cmp dword [edx], 3
jne 0x40150f
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
add eax, edi
xor eax, dword [edx + 4]
mov dword [esp + 0x10], 0
and eax, 0x7fffffff
xor dword [edx + 4], eax
mov eax, dword [edx + 4]
and eax, 0x7fffffff
movzx ecx, word [eax + esi + 0xe]
movzx ebx, word [eax + esi + 0xc]
add eax, esi
add ecx, ebx
test ecx, ecx
mov dword [esp + 0x14], eax
jle 0x40150f
lea ebx, [eax + 0x14]
mov dword [esp + 0x28], ebx
jmp 0x4014b4
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx]
test ecx, 0x80000000
jbe 0x4014f3
lea eax, [ecx + edi]
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
mov dword [ebx], eax
mov ebx, dword [esp + 0x18]
and eax, 0x7fffffff
add dword [eax + esi + 0x14], edi
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0xc]
mov ebx, dword [esp + 0x28]
lea eax, [eax + esi + 0x10]
mov eax, dword [eax + 4]
add ecx, edi
add dword [eax + esi], ecx
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
add dword [esp + 0x10], 1
add ebx, 8
add ecx, eax
cmp dword [esp + 0x10], ecx
mov dword [esp + 0x28], ebx
jl 0x4014b0
cmp dword [edx], 0xe
jne 0x4015bf
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
add eax, edi
xor eax, dword [edx + 4]
mov dword [esp + 0x10], 0
and eax, 0x7fffffff
xor dword [edx + 4], eax
mov eax, dword [edx + 4]
and eax, 0x7fffffff
movzx ecx, word [eax + esi + 0xe]
movzx ebx, word [eax + esi + 0xc]
add eax, esi
add ecx, ebx
test ecx, ecx
mov dword [esp + 0x14], eax
jle 0x4015bf
lea ebx, [eax + 0x14]
mov dword [esp + 0x28], ebx
jmp 0x401564
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx]
test ecx, 0x80000000
jbe 0x4015a3
lea eax, [ecx + edi]
xor eax, ecx
and eax, 0x7fffffff
xor eax, ecx
mov dword [ebx], eax
mov ebx, dword [esp + 0x18]
and eax, 0x7fffffff
add dword [eax + esi + 0x14], edi
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0xc]
mov ebx, dword [esp + 0x28]
lea eax, [eax + esi + 0x10]
mov eax, dword [eax + 4]
add ecx, edi
add dword [eax + esi], ecx
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
add dword [esp + 0x10], 1
add ebx, 8
add ecx, eax
cmp dword [esp + 0x10], ecx
mov dword [esp + 0x28], ebx
jl 0x401560
movzx ecx, word [esi + 0xe]
movzx ebx, word [esi + 0xc]
mov eax, dword [esp + 0x44]
add eax, 1
add ecx, ebx
add edx, 8
cmp eax, ecx
mov dword [esp + 0x44], eax
jl 0x401460
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret