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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51fdc8
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x5c5c30]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp dword [edi + 0x10f4], 0
je 0x4039d3
or eax, 0xffffffff
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 4
mov dword [esp + 0x14], 0
ja case.0x4039e4.1
jmp dword [eax*4 + 0x403f04]
mov eax, dword [edi + 0x60]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4039f1
sub eax, edx
sar eax, 1
cmp eax, dword [edi + 0x64]
jb 0x403a0a
call fcn.004017d0
test eax, eax
mov ebx, dword [ebp + 0x10]
jne 0x403a21
mov esi, dword [ebx + 4]
push 0xfde9
lea eax, [edi + 0x60]
call fcn.00401b30
cmp dword [edi + 0x34], 0
je case.0x4039e4.1
lea eax, [esp + 0x40]
call fcn.00401730
mov dword [esp + 0x78], 0
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov dword [esp + 0x30], eax
push 0xfde9
lea eax, [esp + 0x44]
mov dword [esp + 0x38], ecx
call fcn.00401b30
mov dx, word [ebx + 0x1e]
mov ecx, dword [edi + 0x1104]
mov dword [esp + 0x38], eax
mov ax, word [ebx + 0x20]
mov word [esp + 0x3c], dx
push ecx
lea edx, [esp + 0x34]
mov word [esp + 0x42], ax
mov eax, dword [edi + 0x34]
push edx
call eax
mov ecx, dword [esp + 0x48]
push ecx
call fcn.004263d0
add esp, 0xc
jmp case.0x4039e4.1
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebx + 4]
push 0xfde9
lea eax, [edi + 0x60]
call fcn.00401b30
mov eax, dword [ebx + 0x24]
xor ecx, ecx
cmp eax, ecx
je 0x403acf
mov dword [edi + 0x10e4], eax
mov dword [edi + 0x10e8], ecx
mov dword [edi + 0x10ec], ecx
mov dword [esp + 0x14], 0xffffffff
jmp case.0x4039e4.1
cmp dword [edi + 0x38], ecx
je case.0x4039e4.1
lea eax, [esp + 0x40]
call fcn.00401730
mov dword [esp + 0x78], 1
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov esi, dword [ebx + 0xc]
mov dword [esp + 0x34], eax
push 0xfde9
lea eax, [esp + 0x44]
mov dword [esp + 0x34], edx
call fcn.00401b30
mov cx, word [ebx + 0x1e]
mov dx, word [ebx + 0x20]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x1104]
push eax
mov eax, dword [edi + 0x38]
mov word [esp + 0x40], cx
mov ecx, dword [ebx + 0x24]
mov word [esp + 0x42], dx
push ecx
lea edx, [esp + 0x38]
push edx
call eax
mov ecx, dword [esp + 0x4c]
add esp, 0xc
push ecx
jmp 0x403ee3
lea eax, [esp + 0x30]
call fcn.00401730
lea eax, [esp + 0x28]
mov dword [esp + 0x78], 2
call fcn.00401730
lea eax, [esp + 0x20]
mov byte [esp + 0x78], 3
call fcn.00401730
lea eax, [esp + 0x18]
mov byte [esp + 0x78], 4
call fcn.00401730
lea eax, [esp + 0x40]
mov byte [esp + 0x78], 5
call fcn.00401730
mov ecx, dword [ebp + 0x10]
mov byte [esp + 0x78], 6
test byte [ecx + 0x1c], 0x80
mov eax, 0xfde9
jne 0x403b9d
mov eax, dword [edi + 0x1100]
mov esi, dword [ecx + 4]
push eax
lea eax, [esp + 0x24]
call fcn.00401b30
lea esi, [esp + 0x20]
call fcn.00401a80
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x2c]
mov ecx, esi
call fcn.00401e10
add esp, 4
lea edx, [edi + 0x58]
lea eax, [esp + 0x18]
call fcn.004018e0
lea ebx, [esp + 0x28]
lea eax, [esp + 0x18]
call fcn.004019c0
lea edx, [esp + 0x18]
lea eax, [esp + 0x40]
call fcn.004018e0
lea ebx, [esp + 0x30]
lea eax, [esp + 0x40]
call fcn.004019c0
cmp dword [edi + 0x28], 0
mov esi, dword [esp + 0x40]
mov ebx, dword [ebp + 0x10]
je 0x403c6a
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x4c], ecx
mov ecx, dword [ebx]
mov dword [esp + 0x50], edx
movzx edx, word [ebx + 0x1c]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], ecx
movzx ecx, word [ebx + 0x1a]
lea eax, [esp + 0x60]
mov word [esp + 0x68], dx
movzx edx, word [ebx + 0x18]
push eax
push ecx
push edx
mov dword [esp + 0x64], esi
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov eax, dword [edi + 0x1104]
mov edx, dword [edi + 0x28]
push eax
lea ecx, [esp + 0x4c]
push ecx
call edx
add esp, 8
test eax, eax
je 0x403d56
cmp dword [edi + 0x10f8], 0
je 0x403cb5
lea esi, [edi + 0x10c0]
mov edi, dword [ebx]
call fcn.00401ba0
mov ebx, dword [ebp + 8]
mov edi, 0xff000000
add ebx, 0x48
mov esi, edi
mov edx, ebx
call fcn.00401bf0
test eax, eax
je 0x403ca8
add edi, 1
mov esi, edi
mov edx, ebx
call fcn.00401bf0
test eax, eax
jne 0x403c98
mov esi, dword [esp + 0x40]
mov dword [esp + 0x14], edi
jmp 0x403d56
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00401c70
add esp, 4
test eax, eax
je 0x403d22
push esi
mov dword [edi + 0x10e4], 8
mov dword [edi + 0x10e8], eax
mov dword [edi + 0x10ec], 0
mov dword [esp + 0x18], 0xffffffff
call fcn.004263d0
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call fcn.004263d0
mov eax, dword [esp + 0x24]
add esp, 4
push eax
call fcn.004263d0
mov ecx, dword [esp + 0x2c]
add esp, 4
push ecx
call fcn.004263d0
mov edx, dword [esp + 0x34]
add esp, 4
push edx
jmp 0x403ee3
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push 0x180
push 0x8321
push esi
mov ecx, edi
call edx
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x14], eax
jg 0x403d90
mov dword [edi + 0x10e4], 8
mov dword [edi + 0x10e8], ecx
mov dword [edi + 0x10ec], ecx
push esi
call fcn.004263d0
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call fcn.004263d0
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call fcn.004263d0
mov edx, dword [esp + 0x2c]
add esp, 4
push edx
call fcn.004263d0
mov eax, dword [esp + 0x34]
add esp, 4
push eax
jmp 0x403ee3
mov edx, dword [edi + 0xc]
mov word [edx], cx
mov edx, dword [edi + 0x14]
mov word [edx], cx
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x20], ecx
mov dword [edi + 0x24], ecx
mov dword [edi + 8], eax
mov eax, dword [ebx]
mov dword [edi + 0x1c], eax
lea ebx, [edi + 0x14]
lea edx, [esp + 0x40]
mov eax, ebx
call fcn.004018e0
lea eax, [edi + 0xc]
lea edx, [esp + 0x20]
call fcn.004018e0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x30]
test eax, eax
je 0x403d56
mov ecx, dword [ebx]
fldz
mov edx, dword [edi + 0xc]
fstp dword [esp + 0x58]
mov dword [esp + 0x4c], ecx
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x48], edx
mov edx, dword [edi + 0x20]
mov dword [esp + 0x50], ecx
mov ecx, dword [edi + 0x1104]
mov dword [esp + 0x54], edx
push ecx
lea edx, [esp + 0x4c]
push edx
call eax
add esp, 8
jmp 0x403d56
lea eax, [esp + 0x40]
call fcn.00401730
lea eax, [esp + 0x30]
mov dword [esp + 0x78], 7
call fcn.00401730
mov ecx, dword [ebp + 0x10]
mov byte [esp + 0x78], 8
test byte [ecx + 0x1c], 0x80
mov eax, 0xfde9
jne 0x403e45
mov eax, dword [edi + 0x1100]
mov esi, dword [ecx + 4]
push eax
lea eax, [esp + 0x34]
call fcn.00401b30
lea esi, [esp + 0x30]
call fcn.00401a80
lea edx, [edi + 0x58]
lea eax, [esp + 0x40]
call fcn.004018e0
mov ebx, esi
lea eax, [esp + 0x40]
call fcn.004019c0
cmp dword [edi + 0x10f8], 0
jne 0x403ea1
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x14]
mov esi, edi
call fcn.004038e0
movzx ecx, word [ebx + 0x1a]
movzx edx, word [ebx + 0x18]
mov ax, word [ebx + 0x1c]
mov ebx, dword [esp + 0x40]
push ecx
push edx
call fcn.00403fd0
jmp 0x403ea5
mov ebx, dword [esp + 0x40]
mov ecx, dword [edi + 0x2c]
test ecx, ecx
je 0x403ecd
cmp dword [edi + 0x10f8], 0
je 0x403ebd
lea eax, [edi + 0x10c0]
jmp 0x403ebf
xor eax, eax
mov edx, dword [edi + 0x1104]
push edx
push eax
push ebx
call ecx
add esp, 0xc
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x18], 1
call fcn.004263d0
add esp, 4
push ebx
call fcn.004263d0
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc