Function at 0x404950
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x68
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], ecx
call fcn.00407fc0
cmp dword [ebp - 0x50], 1
jle 0x4049aa
mov edx, dword [ebp - 0x54]
mov edi, str.__version
mov ecx, 0xa
cld
mov ebx, dword [edx + 4]
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x4054de
cld
mov esi, ebx
mov edi, str.__help
mov ecx, 7
repe cmpsb byte [esi], byte es:[edi]
je 0x4054cd
mov dword [esp], 0x40db80
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x405497
xor eax, eax
cmp dword [ebp - 0x50], 2
mov dword [0x40d2c0], eax
jle 0x4049f3
mov eax, dword [ebp - 0x54]
mov edi, str.__attach
mov ecx, dword [ebp - 0x54]
cld
mov esi, dword [eax + 8]
add ecx, 8
mov dword [ebp - 0x4c], ecx
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
jne 0x404a04
cmp dword [ebp - 0x50], 4
je 0x404ae6
call fcn.00403710
mov dword [esp], 1
call sub.msvcrt.dll_exit
xor esi, esi
call fcn.00406230
call fcn.00401850
mov edx, 0x7d1
cmp eax, 0x7b0
jle 0x404a24
call fcn.00401850
lea edx, [eax + 0x21]
mov dword [esp], edx
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x48], eax
call fcn.00401850
mov edx, 0x7d0
cmp eax, 0x7b0
jle 0x404a48
call fcn.00401850
lea edx, [eax + 0x20]
mov dword [esp], edx
call sub.msvcrt.dll_malloc
test esi, esi
mov dword [ebp - 0x44], eax
jne 0x405255
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x11]
call fcn.00403730
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [0x40dae0], eax
mov dword [esp], 0x40db80
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x405459
movzx eax, byte [ebp - 0x11]
sub al, 0x57
cmp al, 1
jbe 0x405423
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.00403350
mov dword [esp], 0x40db80
call sub.msvcrt.dll__setjmp
lea esi, [esi]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x24], 0xffffffff
mov dword [esp], ecx
call fcn.00402ab0
test eax, eax
mov edx, eax
jle 0x4052c6
mov ecx, dword [ebp - 0x48]
movzx eax, byte [ecx]
sub al, 0x21
cmp al, 0x59
ja case.0x404adf.34
movzx eax, al
jmp dword [eax*4 + 0x40aa88]
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0xc]
cmp byte [edx], 0
je 0x4049f3
mov eax, 0xa
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strtoul
test eax, eax
je 0x4049f3
mov esi, eax
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
je 0x404a06
jmp 0x4049f3
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
add eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov esi, eax
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_strtol
mov ebx, eax
mov eax, dword [ebp - 0x48]
movzx ecx, byte [eax + 1]
mov eax, dword [0x40de50]
mov edx, dword [eax + 0x40]
test edx, edx
jne 0x4050fa
lea esi, [esi]
mov edx, dword [ebp - 0x48]
mov byte [edx], 0
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x404ce0
mov ecx, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00402d50
cmp byte [ebp - 0x11], 0x57
je 0x404d00
cmp byte [ebp - 0x11], 0x58
je 0x404d30
movzx eax, byte [ebp - 0x11]
sub al, 0x57
cmp al, 1
ja 0x404ab0
mov eax, dword [0x40de30]
test eax, eax
je 0x405369
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov eax, 0x11
mov edi, 1
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], str.Killing_inferior_n
add ebx, 0x40
mov dword [esp + 0xc], ebx
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40de50]
call dword [eax + 8]
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
call fcn.00401e60
mov dword [esp + 0xc], ebx
mov esi, 0x15
mov ebx, 1
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], str.GDBserver_restarting_n
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x11]
call fcn.00403730
mov dword [ebp - 0x20], eax
jmp 0x404aa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 0x18
mov edx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], str.Detaching_from_inferior_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40de50]
call dword [eax + 0xc]
test eax, eax
je 0x4053d4
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00401e80
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00403030
mov eax, dword [0x40d2c0]
test eax, eax
jne case.0x404adf.34
mov eax, 1
mov dword [0x40de30], eax
movzx eax, byte [ebp - 0x20]
mov dword [esp + 8], eax
movsx eax, byte [ebp - 0x11]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00402790
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
jne 0x404b92
jmp 0x404ce0
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00403030
cmp byte [ebp - 0x11], 0x57
jne 0x404bab
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, str._nChild_exited_with_status__d_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cmp byte [ebp - 0x11], 0x58
jne 0x404bb5
lea esi, [esi]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00405530
mov ebx, eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00405660
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov eax, str._nChild_terminated_with_signal__0x_x___s__n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x404bb5
movzx eax, byte [ebp - 0x20]
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x48]
movsx eax, byte [ebp - 0x11]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00402790
jmp 0x404b86
mov eax, 1
mov dword [esp + 8], eax
lea eax, [ebp - 0x12]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
inc eax
mov dword [esp], eax
call fcn.004024b0
movzx eax, byte [ebp - 0x12]
mov dword [esp], eax
call fcn.00405610
test eax, eax
jne 0x40531b
mov dword [ebp - 0x20], 0
mov dword [esp], 0
call fcn.004058a0
mov eax, dword [ebp - 0x20]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00403630
mov eax, 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x11]
mov dword [esp], eax
call fcn.00405700
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
movzx eax, al
mov dword [ebp - 0x20], eax
movzx eax, al
mov dword [esp + 8], eax
movsx eax, byte [ebp - 0x11]
mov dword [esp + 4], eax
call fcn.00402790
jmp 0x404b86
mov dword [esp], 1
call fcn.004058a0
mov eax, dword [ebp - 0x48]
inc eax
mov dword [esp], eax
call fcn.00401c50
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00401e60
jmp 0x404b86
mov edx, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x48]
movzx eax, byte [edx + 1]
inc ebx
cmp al, 0x63
je 0x404e60
cmp al, 0x67
je 0x404e60
cmp al, 0x73
jne case.0x404adf.34
mov eax, 0x10
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
add eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov dword [esp], eax
call fcn.00401430
test eax, eax
je 0x405049
movzx edx, byte [ebx]
cmp dl, 0x67
je 0x405353
cmp dl, 0x63
je 0x40533f
cmp dl, 0x73
je 0x405349
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00401e60
jmp 0x404b86
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 0x44]
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 0xc], ecx
inc eax
mov dword [esp], eax
call fcn.00402500
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00405790
test eax, eax
jne 0x405049
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
call fcn.00401e60
nop
jmp 0x404b86
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
call fcn.00404880
jmp 0x404b86
mov eax, dword [0x40de30]
test eax, eax
jne 0x4053b0
mov ecx, dword [ebp - 0x48]
mov byte [ecx], 0
jmp 0x404b86
lea eax, [ebp - 0x12]
mov edi, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], edi
inc eax
mov dword [esp], eax
call fcn.004024b0
movzx eax, byte [ebp - 0x12]
mov dword [esp], eax
call fcn.00405610
test eax, eax
jne 0x405307
mov dword [ebp - 0x20], 0
mov dword [esp], 0
mov esi, 1
call fcn.004058a0
mov eax, dword [ebp - 0x20]
mov dword [esp], 1
mov dword [esp + 4], eax
call fcn.00403630
lea eax, [ebp - 0x11]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00405700
movzx eax, al
mov dword [ebp - 0x20], eax
movzx eax, al
jmp 0x404d72
xor ebx, ebx
mov dword [esp], 0
call fcn.004058a0
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.00403630
mov ecx, 1
lea eax, [ebp - 0x11]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00405700
movzx eax, al
mov dword [ebp - 0x20], eax
movzx eax, al
jmp 0x404cae
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x18]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x38]
mov dword [esp + 8], eax
lea eax, [edx - 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
inc eax
mov dword [esp], eax
call fcn.004022b0
test eax, eax
js 0x405049
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x34]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00405790
test eax, eax
je 0x404eab
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00401e80
jmp 0x404b86
xor eax, eax
mov edx, 0x10
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], edx
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov dword [esp], eax
call fcn.00401430
test eax, eax
je 0x405049
mov dword [esp], eax
mov eax, dword [0x40de50]
call dword [eax + 0x14]
test eax, eax
jne 0x404eab
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
call fcn.00401e80
nop
jmp 0x404b86
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
add eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov esi, eax
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_strtol
mov ebx, eax
mov eax, dword [ebp - 0x48]
movzx ecx, byte [eax + 1]
mov eax, dword [0x40de50]
mov edx, dword [eax + 0x3c]
test edx, edx
je case.0x404adf.34
mov al, cl
sub al, 0x32
cmp al, 2
ja case.0x404adf.34
xor eax, eax
mov dword [esp + 8], eax
movsx eax, cl
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call edx
test eax, eax
je 0x40532f
dec eax
jne 0x405093
mov eax, dword [ebp - 0x48]
mov byte [eax], 0
jmp 0x404b86
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00403c30
jmp 0x404b86
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov edi, 0x11
mov esi, 1
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], str.Killing_inferior_n
add ebx, 0x40
mov dword [esp + 0xc], ebx
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40de50]
call dword [eax + 8]
mov ecx, dword [0x40de30]
test ecx, ecx
je 0x4053a4
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
jmp 0x404c09
lea eax, [ebp - 0x18]
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
inc eax
mov dword [esp], eax
call fcn.004023d0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x34]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00405840
test eax, eax
jne 0x405093
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00401ea0
jmp 0x404b86
mov dword [esp], 1
call fcn.004058a0
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00401a60
jmp 0x404b86
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
lea eax, [ebp - 0x11]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00403a20
jmp 0x404b86
mov dword [esp], 0
call fcn.004058a0
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp], 1
jmp 0x404ddf
mov eax, dword [0x40de50]
mov dword [esp], esi
call dword [eax + 4]
test eax, eax
jne 0x405417
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov eax, str.Attached__pid___d_n
mov dword [esp + 8], esi
mov dword [esp + 4], eax
add ebx, 0x40
mov dword [esp], ebx
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x11]
mov dword [0x40db30], esi
mov dword [esp], eax
call fcn.00405700
cmp byte [ebp - 0x11], 0x54
mov dl, al
movzx eax, al
mov dword [ebp - 0x20], eax
je 0x405402
mov eax, 1
mov dword [0x40d2c0], eax
jmp 0x404a70
mov eax, dword [0x40de30]
test eax, eax
jne 0x40539f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], str.Remote_side_has_terminated_connection.__GDBserver_will_reopen_the_connection._n
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x4e
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
call fcn.00403330
jmp 0x404a92
movzx eax, byte [ebp - 0x12]
mov dword [esp], eax
call fcn.00405660
mov dword [ebp - 0x20], eax
jmp 0x404f74
movzx eax, byte [ebp - 0x12]
mov dword [esp], eax
call fcn.00405660
mov dword [ebp - 0x20], eax
jmp 0x404dc5
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00401e60
jmp 0x404b86
mov dword [0x40db70], eax
jmp 0x404eab
mov dword [0x40db50], eax
jmp 0x404eab
mov dword [0x40db40], eax
mov dword [esp], 1
call fcn.004058a0
jmp 0x404eab
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 0x12
mov edx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], str.GDBserver_exiting_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 0
call sub.msvcrt.dll_exit
call fcn.00403330
mov dword [esp], 0
call sub.msvcrt.dll_exit
mov eax, dword [0x40de50]
call dword [eax + 8]
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00401e60
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
jmp 0x404c12
mov edx, dword [ebp - 0x48]
mov dword [esp], edx
call fcn.00401e60
mov ecx, dword [ebp - 0x48]
mov dword [esp], ecx
call fcn.00403030
call fcn.00403330
mov eax, dword [0x40d2c0]
test eax, eax
jne 0x4053a4
mov eax, dword [0x40de50]
call dword [eax + 0x10]
jmp 0x4053a4
cmp dl, 0x11
jne 0x4052b7
mov dword [ebp - 0x20], 5
jmp 0x4052b7
mov dword [esp], str.Attaching_not_supported_on_this_target
call fcn.00405a10
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, 0x20
mov ebx, 1
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], str.No_inferior__GDBserver_exiting._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call sub.msvcrt.dll_exit
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp], str.Killing_inferior_n
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 0x11
mov dword [esp + 8], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40de50]
call dword [eax + 8]
mov dword [esp], 1
call sub.msvcrt.dll_exit
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 8
mov edx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], str.Exiting_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call sub.msvcrt.dll_exit
call fcn.00403710
mov dword [esp], 0
call sub.msvcrt.dll_exit
mov esi, str.i686_pc_mingw32
mov ebx, str.6.7.50.20071127
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], str.GNU_gdbserver__s_nCopyright__C__2007_Free_Software_Foundation__Inc._ngdbserver_is_free_software__covered_by_the_GNU_General_Public_License._nThis_gdbserver_was_configured_as___s__n
call sub.msvcrt.dll_printf
mov dword [esp], 0
call sub.msvcrt.dll_exit
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp eax, 0x97
ja 0x405526
mov eax, dword [eax*8 + 0x40bc14]
pop ebp
ret
mov eax, dword [str.Unknown_signal]
pop ebp
ret