Function at 0x401db3
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp byte [esi + 0x3a], 0
jne 0x401f36
mov ebx, dword [ebp + 0xc]
movzx eax, word [ebx + 0x86]
add dword [esi - 0x77000000], 0x45
in al, dx
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [0x48f634]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov edx, dword [esi + 0x44]
mov edi, dword [esi + 0x48]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0xc], eax
mov dword [ebp - 8], edx
mov dword [ebp + 8], edi
test ecx, ecx
je 0x43bd51
test eax, eax
je 0x43bd68
cmp dword [esi + 0x19c], 0
jne 0x43bd7f
lea eax, [ebp - 0x34]
push eax
push dword [ebx]
call dword [0x48f694]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
sub eax, ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x30]
sub edx, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
push dword [esi]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], ecx
call dword [0x48f670]
mov edi, dword [ebp - 0x1c]
mov eax, edi
imul eax, dword [ebp - 8]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
cdq
idiv dword [ebp + 0x10]
mov word [ebx + 0x88], ax
mov eax, esi
imul eax, dword [ebp + 8]
cdq
idiv dword [ebp + 0xc]
mov word [ebx + 0x8a], ax
mov eax, dword [ebp - 0xc]
imul eax, dword [ebp - 8]
cdq
idiv dword [ebp + 0x10]
mov word [ebx + 0x8c], ax
mov eax, dword [ebp - 0x10]
imul eax, dword [ebp + 8]
cdq
idiv dword [ebp + 0xc]
mov word [ebx + 0x8e], ax
test cx, cx
je 0x401f2d
aam 0x8b
dec ebp
int3
test ecx, 0x100
je 0x401ed3
mov eax, dword [ebp - 0xc]
mov word [ebx + 0x8c], ax
test cl, 6
jne 0x401ed3
test cl, 8
jne 0x43bd91
mov eax, dword [ebp + 0x10]
cdq
sub eax, edx
sar eax, 1
cmp edi, eax
jg 0x43bdaf
test ecx, 0x200
je 0x401f02
mov eax, dword [ebp - 0x10]
mov word [ebx + 0x8e], ax
test cl, 0x60
jne 0x401f02
test cl, cl
js 0x43bdd1
fistp word [esi + 0x458b0003]
or al, 0x99
mov eax, dword [ebp + 0xc]
cdq
sub eax, edx
sar eax, 1
cmp esi, eax
jg 0x43bdef
mov edx, dword [ebp + 8]
mov eax, ecx
and eax, 2
jne 0x43be13
test cl, 4
jne 0x43be1f
mov eax, ecx
and eax, 0x20
jne 0x43be61
and byte [edi], cl
test dword [0xf600039f], edi
rol dword [eax + 0xf], 0x85
inc eax
lahf
add eax, dword [eax]
test cl, 0x40
jne 0x43be6d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
or al, 0
mov edi, dword [ebp + 0xc]
mov ax, word [esi + 0x58]
cmp byte [edi + 0x90], 7
mov word [edi + 0x88], ax
mov ax, word [esi + 0x5c]
mov word [edi + 0x8a], ax
je 0x401fb7
mov ax, word [esi + 0x60]
mov word [edi + 0x8c], ax
mov ax, word [esi + 0x64]
mov word [edi + 0x8e], ax
lea eax, [ebp - 0x24]
push eax
push dword [edi]
call dword [0x48f634]
or ebx, 0xffffffff
cmp dword [esi + 0x58], ebx
je 0x401fbf
cmp dword [esi + 0x5c], ebx
je 0x401fcc
lea eax, [ebp - 0x24]
push eax
push dword [edi]
call dword [0x48f694]
cmp dword [esi + 0x60], ebx
je 0x43bd2d
cmp dword [esi + 0x64], ebx
je 0x43bd3f
cmp byte [edi + 0x90], 0
jne 0x401f2d
jmp 0x43bd3f
cmp byte [ebp + 0x10], 0
je 0x401f6e
jmp 0x401f58
mov ax, word [ebp - 0x24]
mov word [edi + 0x88], ax
jmp 0x401f82
mov ax, word [ebp - 0x20]
mov word [edi + 0x8a], ax
jmp 0x401f87
cld
invalid
sbb al, 0xf7
dec eax
in al, dx
jmp 0x401dbe
mov word [eax], es
dec ecx
add cl, ch
pop ebp
invalid
fsub qword [ecx - 4]
inc edi
inc ebp
adc byte [ecx + ecx*2], bl
add byte [eax], al
test edx, edx
je 0x401e1d
mov dword [ebp + 0x10], edx
jmp 0x401e1d
lcall 0xc45, 0xc7fffc60
sbb al, 0x49
add byte [eax], al
test edi, edi
je 0x401e25
dec dword [ecx - 0x7416f383]
pushal
cld
jmp [edx + 0xf]
mov dword [ebp + 0xc], edi
jmp 0x401e25
mov ecx, edi
sub eax, dword [ebp + 0x10]
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov word [ebx - 0x13ffff78], cx
mov ecx, dword [ebp - 0x14]
jmp 0x401eee
hlt
mov ecx, esi
sub eax, dword [ebp + 0xc]
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov word [ebx - 0x13ffff76], cx
mov ecx, dword [ebp - 0x14]
jmp 0x401f1d
scasd eax, dword es:[edi]
inc ebp
or byte [ecx - 0x74f38209], bl
push ebp
or byte [ebx], ch
inc ebp
invalid
sub di, word [ebx + 0x49008c]
add di, word [ebp - 8]
add di, word [ebp - 0xc]
add edi, dword [ebp - 0xc]
mov word [ebx - 0x13ffff78], di
jmp 0x401f34