Function at 0x423160
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x86c
mov eax, dword [esp + 0x880]
fld qword [esp + 0x88c]
fst qword [esp + 0x30]
mov ecx, dword [eax]
test ecx, ecx
je 0x423667
mov edx, dword [eax + 4]
test edx, edx
je 0x423660
mov eax, dword [0xc10b00]
test eax, eax
jne 0x423534
fstp st(0)
fnstcw word [esp + 0x56]
fld qword [esp + 0x30]
xor edx, edx
fmul qword [0xafaf20]
movzx eax, word [esp + 0x56]
mov ah, 0xc
mov word [esp + 0x54], ax
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov eax, dword [esp + 0x48]
push edx
xor edx, edx
mov ebp, eax
imul eax, eax, 0xe10
push eax
fild qword [esp]
add esp, 8
fsubr qword [esp + 0x30]
fld qword [0xafaf28]
fmul st(1)
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov eax, dword [esp + 0x48]
push edx
xor edx, edx
mov ebx, eax
imul eax, eax, 0x3c
push eax
fild qword [esp]
add esp, 8
fsubp st(1)
fld st(0)
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov eax, dword [esp + 0x48]
push edx
push eax
mov edi, eax
fild qword [esp]
add esp, 8
fsubp st(1)
fmul dword [0xafaf30]
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov eax, dword [esp + 0x48]
cmp eax, 0x3e8
mov esi, eax
sbb eax, eax
and esi, eax
cmp ebp, dword [0xad1edc]
jne 0x42325e
cmp ebx, dword [0xad1ed8]
je 0x423617
mov dword [esp], ecx
call sub.msvcrt.dll_ftell
mov edx, dword [esp + 0x880]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebp
mov dword [esp + 4], 0xafa7b0
mov dword [esp + 0x18], eax
mov eax, dword [edx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [0xad1edc], ebp
mov dword [0xad1ed8], ebx
mov dword [0xad1ed4], edi
mov dword [0xad1ed0], esi
fnstcw word [esp + 0x56]
movzx eax, word [esp + 0x56]
mov ah, 0xc
mov word [esp + 0x54], ax
fld qword [esp + 0x30]
mov esi, 0xc10af0
fst qword [0xc10b10]
fmul dword [0xafaf18]
mov dword [0xc10b00], 1
cld
mov byte [esp + 0x63], 0
mov byte [esp + 0x64], 0
mov byte [esp + 0x65], 1
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov byte [esp + 0x66], 0xba
mov eax, dword [esp + 0x48]
mov byte [esp + 0x67], 0x40
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov ecx, eax
shr eax, 0x1d
and eax, 0xe
or eax, 0x21
mov byte [esp + 0x863], al
mov eax, ecx
shr eax, 0x16
mov byte [esp + 0x864], al
mov eax, ecx
shr eax, 0xe
or eax, 1
mov byte [esp + 0x865], al
mov eax, ecx
shr eax, 7
mov byte [esp + 0x866], al
lea eax, [esp + 0x863]
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x2c]
lea ebx, [ecx + ecx]
or ebx, 1
mov eax, 5
mov ecx, eax
mov byte [esp + 0x867], bl
repe cmpsb byte [esi], byte es:[edi]
lea edi, [esp + 0x63]
mov byte [0xc10af4], bl
mov ebx, dword [esp + 0x888]
mov byte [esp + 0x70], 0
setb dl
seta al
sub al, dl
movsx eax, al
cmp eax, 1
mov eax, dword [esp + 0x863]
sbb edx, edx
not edx
and edx, 5
mov dword [0xc10af0], eax
lea ecx, [edx + ebx + 4]
mov eax, 0x7ec
sub eax, ecx
js 0x423634
cmp eax, 6
jg 0x423548
lea ebx, [eax + edx]
mov ebp, eax
mov byte [esp + 0x3f], bl
lea ebx, [edx + edi + 0x17]
mov esi, edx
add ebp, ebx
mov dword [esp + 0x28], ebp
add ebp, 1
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebp
test edx, edx
lea ecx, [eax + ecx]
mov byte [esp + 0x3e], 0
je 0x4233f5
mov byte [esp + 0x3e], pe_nt_image_headers32
mov eax, ecx
movzx edx, byte [esp + 0x3f]
sar eax, 8
mov byte [esp + 0x75], al
movzx eax, byte [esp + 0x3e]
lea ebp, [esp + 0x7a]
mov byte [esp + 0x76], cl
lea ecx, [esp + 0x863]
mov byte [esp + 0x79], dl
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
mov byte [esp + 0x71], 0
mov byte [esp + 0x72], 0
mov byte [esp + 0x73], 1
mov byte [esp + 0x74], 0xbd
mov byte [esp + 0x77], pe_nt_image_headers32
mov byte [esp + 0x78], al
mov dword [esp], ebp
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x40]
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x880]
mov ecx, dword [esp + 0x28]
movzx eax, byte [edx + 8]
or eax, 0x20
mov byte [ecx], al
mov esi, dword [esp + 0x44]
mov eax, dword [edx]
mov dword [esp + 8], 1
mov dword [esp], edi
sub esi, edi
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
call sub.msvcrt.dll_fwrite
sub eax, 1
je 0x423570
mov dword [esp], 0xafa7e0
mov ebx, 0x800
mov esi, 0x800
call sub.msvcrt.dll_perror
mov eax, 7
mov edx, 0xfffffffa
mov byte [esp + 0x68], dl
lea edx, [esp + 0x69]
mov byte [esp + 0x67], al
mov eax, edx
sub eax, edi
sub ebx, eax
mov dword [esp], edx
mov byte [esp + 0x63], 0
mov byte [esp + 0x64], 0
mov byte [esp + 0x65], 1
mov byte [esp + 0x66], 0xbe
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x880]
mov eax, dword [edx]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
sub eax, 1
je 0x423529
mov dword [esp], 0xafa7fc
call sub.msvcrt.dll_perror
add esp, 0x86c
pop ebx
pop esi
pop edi
pop ebp
ret
fcomp qword [0xc10b10]
fnstsw ax
sahf
jne 0x4231a0
jmp 0x4232ac
lea ebx, [edx + edi + 0x17]
mov esi, edx
lea eax, [ebx + 1]
mov dword [esp + 0x44], eax
xor eax, eax
mov byte [esp + 0x3f], dl
mov dword [esp + 0x28], ebx
mov dword [esp + 0x40], 0
jmp 0x4233e4
mov ebx, dword [esp + 0x880]
mov ebp, dword [esp + 0x888]
mov eax, dword [ebx]
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x884]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
sub eax, 1
jne 0x42349d
mov ebx, 0x800
sub ebx, dword [esp + 0x888]
sub ebx, esi
cmp ebx, 5
jg 0x423674
cmp ebx, 0
jle 0x423684
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.msvcrt.dll_memset
mov ecx, dword [esp + 0x880]
mov eax, dword [ecx]
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
sub eax, 1
je 0x423529
mov dword [esp], 0xafa820
call sub.msvcrt.dll_perror
jmp 0x423529
cmp edi, dword [0xad1ed4]
jne 0x42325e
cmp esi, dword [0xad1ed0]
jne 0x42325e
jmp 0x4232bc
lea ebx, [esp + 0x7a]
sub ecx, edx
lea ebp, [esp + 0x7b]
xor esi, esi
mov byte [esp + 0x3e], 0
mov byte [esp + 0x3f], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], ebp
jmp 0x4233f5
fstp st(0)
jmp 0x4232ac
fstp st(0)
add esp, 0x86c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebx - 6]
mov esi, ebx
shr eax, 8
lea edx, [ebx - 6]
jmp 0x4234bd
je 0x423529
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, dword [esp + 0x888]
mov dword [esp + 4], 0xafa84c
add eax, 0x40
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x423529