Function at 0x413a70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x54
mov ax, word [0x507da0]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.msvcr80.dll_fwrite]
push edi
mov ebx, 0x11
mov edi, 0x504904
mov dword [esp + 0x58], ebx
mov dword [esp + 0x60], edi
cmp dword [edi], 0
je 0x413bf2
test ax, ax
jne 0x413b28
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, 4
mov ebp, 1
push ebp
mov byte [esp + 0x58], al
lea eax, [esp + 0x58]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
add word [0x50a662], bp
neg eax
test ax, ax
mov word [0x507da0], ax
jne 0x413b28
movsx edx, word [0x507668]
mov cl, byte [0x506de8]
mov eax, dword [edx*4 + 0x440188]
push eax
xor cl, bl
push ebp
mov byte [esp + 0x58], cl
lea ecx, [esp + 0x58]
push ebp
push ecx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
mov edi, dword [edi]
mov ebp, dword [edi]
mov ebx, ebp
call fcn.00413350
mov eax, ebp
cdq
and edx, 0xffff
add eax, edx
mov ebx, eax
sar ebx, 0x10
call fcn.00413350
mov ax, word [0x507da0]
test ax, ax
mov byte [esp + 0x10], 0
jne 0x413b96
movsx eax, word [0x507668]
mov ecx, dword [eax*4 + 0x440188]
mov dl, byte [0x506de8]
push ecx
push 1
mov byte [esp + 0x18], dl
lea edx, [esp + 0x18]
push 1
push edx
call esi
sub eax, 1
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], 1
mov word [0x507da0], ax
add edi, 5
cmp ebp, 5
jbe 0x413bf2
lea ebx, [ebp - 5]
test ax, ax
mov cl, byte [edi]
mov byte [esp + 0x14], cl
jne 0x413bea
xor cl, byte [0x506de8]
movsx eax, word [0x507668]
mov byte [esp + 0x14], cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push 1
lea edx, [esp + 0x1c]
push 1
push edx
call esi
sub eax, 1
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], 1
mov word [0x507da0], ax
add edi, 1
sub ebx, 1
jne 0x413ba1
mov ebx, dword [esp + 0x58]
mov edi, dword [esp + 0x60]
add ebx, 1
add edi, 4
cmp bx, 0xc1
mov dword [esp + 0x58], ebx
mov dword [esp + 0x60], edi
jb 0x413a95
test ax, ax
jne 0x4143c6
xor ebx, ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], 0x5055e0
mov dword [esp + 0x60], 0x505540
mov ecx, dword [esp + 0x5c]
cmp dword [ecx], 0
je 0x413da0
test ax, ax
jne 0x413cca
movsx eax, word [0x507668]
mov dl, byte [0x506de8]
mov ecx, dword [eax*4 + 0x440188]
push ecx
xor dl, 1
mov edi, 1
push edi
mov byte [esp + 0x58], dl
lea edx, [esp + 0x58]
push edi
push edx
call esi
sub eax, edi
add esp, 0x10
neg eax
sbb eax, eax
add word [0x50a662], di
neg eax
test ax, ax
mov word [0x507da0], ax
jne 0x413cca
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, bl
push edi
mov byte [esp + 0x58], al
lea eax, [esp + 0x58]
push edi
push eax
call esi
sub eax, edi
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], di
mov word [0x507da0], ax
mov ecx, dword [esp + 0x60]
mov bx, word [ecx]
call fcn.00413350
mov edx, dword [esp + 0x5c]
mov ebp, dword [edx]
mov edi, dword [ebp]
mov ebx, edi
call fcn.00413350
mov eax, edi
cdq
and edx, 0xffff
add eax, edx
mov ebx, eax
sar ebx, 0x10
call fcn.00413350
mov ax, word [0x507da0]
test ax, ax
mov byte [esp + 0x18], 0
mov ebx, 1
jne 0x413d49
movsx ecx, word [0x507668]
mov edx, dword [ecx*4 + 0x440188]
mov al, byte [0x506de8]
push edx
push ebx
mov byte [esp + 0x20], al
lea eax, [esp + 0x20]
push ebx
push eax
call esi
sub eax, ebx
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bx
mov word [0x507da0], ax
add ebp, 5
cmp edi, 5
jbe 0x413da0
add edi, 0xfffffffb
test ax, ax
mov cl, byte [ebp]
mov byte [esp + 0x1c], cl
jne 0x413d9a
xor cl, byte [0x506de8]
lea eax, [esp + 0x1c]
mov byte [esp + 0x1c], cl
movsx ecx, word [0x507668]
mov edx, dword [ecx*4 + 0x440188]
push edx
push ebx
push ebx
push eax
call esi
sub eax, ebx
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bx
mov word [0x507da0], ax
add ebp, ebx
sub edi, ebx
jne 0x413d54
mov ebx, dword [esp + 0x58]
add dword [esp + 0x60], 2
add dword [esp + 0x5c], 4
add ebx, 1
cmp bx, 0x50
mov dword [esp + 0x58], ebx
jb 0x413c32
test ax, ax
jne 0x4143c6
movzx cx, byte [0x505985]
movzx ecx, cx
movsx edx, cx
mov ecx, dword [0x505430]
add ecx, edx
mov dl, byte [ecx]
and dl, 0x81
mov ebp, 1
or dl, 1
cmp word [0x507730], bp
mov byte [ecx], dl
mov ebx, ebp
jle 0x413f0e
mov edi, ebp
mov edi, edi
mov ecx, dword [0x505430]
mov cl, byte [ecx + edi]
mov dl, cl
and dl, 0x7f
cmp dl, 1
je 0x413e1b
test cl, cl
jns 0x413ef1
test ax, ax
mov byte [esp + 0x20], 3
jne 0x413e60
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, 3
push ebp
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov byte [esp + 0x24], bl
jne 0x413ea5
movsx edx, word [0x507668]
mov eax, dword [edx*4 + 0x440188]
mov cl, bl
xor cl, byte [0x506de8]
push eax
push ebp
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x2c]
push ebp
push ecx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov edx, dword [0x505430]
mov cl, byte [edx + edi]
mov byte [esp + 0x28], cl
jne 0x413ef1
xor cl, byte [0x506de8]
movsx eax, word [0x507668]
mov byte [esp + 0x28], cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push ebp
lea edx, [esp + 0x30]
push ebp
push edx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
movsx ecx, word [0x507730]
add ebx, ebp
movzx edi, bx
cmp edi, ecx
jl 0x413e00
test ax, ax
jne 0x4143c6
cmp word [0x507682], bp
mov ebx, ebp
jle 0x41402e
mov edi, ebp
nop
mov edx, dword [0x5093a0]
mov cl, byte [edx + edi]
mov dl, cl
and dl, 0x7f
cmp dl, 1
je 0x413f3b
test cl, cl
jns 0x414011
test ax, ax
mov byte [esp + 0x2c], 2
jne 0x413f80
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, 2
push ebp
mov byte [esp + 0x34], al
lea eax, [esp + 0x34]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov byte [esp + 0x30], bl
jne 0x413fc5
movsx edx, word [0x507668]
mov eax, dword [edx*4 + 0x440188]
mov cl, bl
xor cl, byte [0x506de8]
push eax
push ebp
mov byte [esp + 0x38], cl
lea ecx, [esp + 0x38]
push ebp
push ecx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov edx, dword [0x5093a0]
mov cl, byte [edx + edi]
mov byte [esp + 0x34], cl
jne 0x414011
xor cl, byte [0x506de8]
movsx eax, word [0x507668]
mov byte [esp + 0x34], cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push ebp
lea edx, [esp + 0x3c]
push ebp
push edx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
movsx ecx, word [0x507682]
add ebx, ebp
movzx edi, bx
cmp edi, ecx
jl 0x413f20
test ax, ax
jne 0x4143c6
cmp word [0x505220], bp
mov ebx, ebp
jle 0x41414e
mov edi, ebp
nop
mov edx, dword [0x5045c4]
mov cl, byte [edx + edi]
mov dl, cl
and dl, 0x7f
cmp dl, 1
je 0x41405b
test cl, cl
jns 0x414131
test ax, ax
mov byte [esp + 0x38], 5
jne 0x4140a0
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, 5
push ebp
mov byte [esp + 0x40], al
lea eax, [esp + 0x40]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov byte [esp + 0x3c], bl
jne 0x4140e5
movsx edx, word [0x507668]
mov eax, dword [edx*4 + 0x440188]
mov cl, bl
xor cl, byte [0x506de8]
push eax
push ebp
mov byte [esp + 0x44], cl
lea ecx, [esp + 0x44]
push ebp
push ecx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov edx, dword [0x5045c4]
mov cl, byte [edx + edi]
mov byte [esp + 0x40], cl
jne 0x414131
xor cl, byte [0x506de8]
movsx eax, word [0x507668]
mov byte [esp + 0x40], cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push ebp
lea edx, [esp + 0x48]
push ebp
push edx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
movsx ecx, word [0x505220]
add ebx, ebp
movzx edi, bx
cmp edi, ecx
jl 0x414040
test ax, ax
jne 0x4143c6
mov ebx, ebp
mov edi, ebp
mov edx, dword [0x505b64]
mov cl, byte [edi + edx]
mov dl, cl
and dl, 0x7f
cmp dl, 1
je 0x41416d
test cl, cl
jns 0x414243
test ax, ax
mov byte [esp + 0x44], 6
jne 0x4141b2
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
xor al, 6
push ebp
mov byte [esp + 0x4c], al
lea eax, [esp + 0x4c]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov byte [esp + 0x48], bl
jne 0x4141f7
movsx edx, word [0x507668]
mov eax, dword [edx*4 + 0x440188]
mov cl, bl
xor cl, byte [0x506de8]
push eax
push ebp
mov byte [esp + 0x50], cl
lea ecx, [esp + 0x50]
push ebp
push ecx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
test ax, ax
mov edx, dword [0x505b64]
mov cl, byte [edi + edx]
mov byte [esp + 0x4c], cl
jne 0x414243
xor cl, byte [0x506de8]
movsx eax, word [0x507668]
mov byte [esp + 0x4c], cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push ebp
lea edx, [esp + 0x54]
push ebp
push edx
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
add ebx, ebp
add edi, ebp
cmp bx, 0xc8
jb 0x414152
test ax, ax
jne 0x4143c6
movsx ecx, word [0x507668]
mov al, byte [0x506de8]
mov edx, dword [ecx*4 + 0x440188]
push edx
not al
push ebp
mov byte [esp + 0x5c], al
lea eax, [esp + 0x5c]
push ebp
push eax
call esi
sub eax, ebp
add esp, 0x10
neg eax
sbb eax, eax
add word [0x50a662], bp
neg eax
test ax, ax
mov word [0x507da0], ax
jne 0x4143c6
movzx ecx, byte [0x505985]
mov edx, dword [0x504ce4]
xor bl, bl
mov byte [0x5044a4], bl
mov ecx, dword [edx + ecx*4]
mov edx, dword [0x505998]
add ecx, edx
xor edi, edi
cmp byte [ecx], 0
mov dword [0x50a88c], ecx
jbe 0x4143c6
jmp 0x4142de
mov ax, word [0x507da0]
mov bl, byte [0x5044a4]
test bl, bl
je 0x4142f3
movzx edx, bl
test byte [edx + edx*2 + 0x5082c2], 0x20
je 0x4142f3
xor ecx, ecx
jmp 0x414308
movzx edx, di
mov dword [0x50a88c], ecx
lea edx, [edx + edx*4]
movzx cx, byte [ecx + edx*4 + 0x12]
movzx ecx, cx
test ax, ax
mov byte [esp + 0x50], cl
jne 0x414356
mov dl, byte [0x506de8]
movsx eax, word [0x507668]
xor dl, cl
mov ecx, dword [eax*4 + 0x440188]
push ecx
push 1
mov byte [esp + 0x58], dl
lea edx, [esp + 0x58]
push 1
push edx
call esi
mov bl, byte [0x5044a4]
sub eax, 1
add esp, 0x10
neg eax
sbb eax, eax
neg eax
add word [0x50a662], bp
mov word [0x507da0], ax
movzx eax, bl
test byte [eax + eax*2 + 0x5082c2], 0x20
je 0x41436d
movzx ebx, word [eax*2 + 0x509700]
jmp 0x414393
movzx eax, byte [0x505985]
mov ecx, dword [0x504ce4]
mov eax, dword [ecx + eax*4]
add eax, dword [0x505998]
movzx ecx, di
lea edx, [ecx + ecx*4]
movzx ebx, word [eax + edx*4 + 0x13]
mov dword [0x50a88c], eax
call fcn.00413350
movzx eax, byte [0x505985]
mov ecx, dword [0x504ce4]
mov edx, dword [ecx + eax*4]
mov eax, dword [0x505998]
lea ecx, [edx + eax]
mov eax, ecx
movzx dx, byte [eax]
add edi, ebp
cmp di, dx
mov dword [0x50a88c], eax
jb 0x4142d2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret